0

I used the below code to find text which is present in form located in an iframe.

ObjIE.document.frames(0).document.forms(0).innerText

Am new to VBA, can some body explain what exactly 0 in Frames(0)/forms (0) is?

If it something like Frame index or frame number(As of my assumption) please let me know how can we find frame index of a particular frame(in any HTML document)?

Community
  • 1
  • 1
Sukesh
  • 13
  • 1
  • 8
  • That depends on the website you are opening. Apparently, you have a website which consists of several items including frames and forms. There might be a "title" frame, a frame for the "table of content", and yet another frame for the actual content. In this scenario frame 0 would possibly be the title frame. Every website has it's own layout. Using frames and forms to structure it is normal. – Ralph Jul 31 '15 at 12:39

1 Answers1

0

The zero is the index. The only way I know to determine the index number of a desired frame is to check the innerHTML of the frame. If you know the name of the frame, then you use that instead of the index number.

The DOM references are discussed further in a post on Stack Overflow.

Community
  • 1
  • 1
DiegoAndresJAY
  • 706
  • 4
  • 11