Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
IFrameCollection = browserdoc.GetElementsByTagName("IFRAME") Message("Debug", IFrameCollection.length)
I think that you misunderstood me. I meant that I want to access information in the source.html that opens up within this inline frame.
DebugTrace(@ON,DirScript():'Trace-IFrames.txt') #DefineSubRoutine startMSIE() DebugTrace(22,'') Browser = ObjectCreate("InternetExplorer.Application") Browser.addressbar = @TRUE Browser.statusbar = @TRUE Browser.menubar = @TRUE Browser.toolbar = @TRUE browser.visible = @TRUE browser.navigate(url) ;wait until page loads... WaitForPageLoad() ;setup the document object... browserDoc = Browser.Document Return(browserDoc) #EndSubRoutine #DefineSubRoutine WaitForPageLoad() ; assume Browser DebugTrace(22,'') While browser.busy || browser.readystate == 1 TimeDelay(0.5) EndWhile Return #EndSubRoutine URL = "http://www.htmlcodetutorial.com/frames/_IFRAME.html" browserDoc = startMSIE() WaitForPageLoad() iFrameCollection = Browser.Document.GetElementsByTagName("IFRAME") iFrameCount = IFrameCollection.length For x = 0 To iFrameCount-1 Frame_Obj = IFrameCollection.item(x) last = 0 ErrorMode(@OFF) daName = Frame_Obj.name last = LastError() If last Then daName = "" ErrorMode(@CANCEL) last = 0 ErrorMode(@OFF) daId = Frame_Obj.id last = LastError() If last Then daId = "" ErrorMode(@CANCEL) ErrorMode(@OFF) daSrc = Frame_Obj.Src last = LastError() If last Then daSrc = "" ErrorMode(@CANCEL) If VarType(daName) == 512 && daName == "" Then daName = "" ; these two statements are needed to If VarType(daId) == 512 && daId == "" Then daId = "" ; determine if the result is empty If VarType(daSrc) == 512 && daSrc == "" Then daSrc = "" ; determine if the result is empty Pause("Frame ":x,"Name = ":daName:@CRLF:"ID = ":daId:@CRLF:'SOURCE = ':daSrc) Next browser = 0 Message("All","Done") Exit
Article ID: W16631
File Created: 2011:06:21:14:51:28
Last Updated: 2011:06:21:14:51:28