GetFrameSource$

Web function.

The GetFrameSource$ function returns the source code of the specified frame in the current Web page. Not available in WinTask Lite.

Usage

It gives the same results as the View/Source option in the context menu when you right click somewhere in the frame. To be sure that the page is loaded before invoking the function, you can include a UsePage line before.

Syntax

var$=GetFrameSource$(<src_framename>)

Parameters

<src_framename>, string, SRC property of the frame as seen in View/Source of the main page

Return value

var$, string, long string with all the source code of the specified frame. If the source code could not be returned for any reason, the string is empty (an empty string is "").

Remarks

Before invoking this function, a UsePage call must specify on which page the frame has to be found. If you want to be sure that the frame is loaded before calling GetFrameSource$, you can force this synchronization by adding a UsePage line if the previous UsePage is a couple of lines above the GetFrameSource$ call.

Example

 
UsePage("WinTask Frames")

'The page includes a frame which loads the frame7.htm file
a$=getframesource$("frame7.htm")
msgbox(a$)