Jump to content
Server Maintenance This Week. ×

Script or indicator when a page has finished loading


This topic is 3193 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a WebViewer Text field that I text parse.

Is there a way to create a field or indicator that changes the variable to say 1 once the page has finished loading?

Then I could set a button for example to appear or turn green ready to click once the page has finished loading

Thanks

Matt

Link to comment
Share on other sites

I have a WebViewer Text field that I text parse.

There is no such thing as a "WebViewer Text field". If you meant a Web Viewer layout object, you could do something like:

Go to Layout [ YourLayout ] 
Set Web Viewer [ Object Name: "YourWebViewer"; URL: "http://example.com" ] 
Loop 
	Pause/Resume Script [ Duration (seconds): 1 ] 
	Set Variable [ $html; Value:GetLayoutObjectAttribute ( "YourWebViewer" ; "content" ) ] 
	Exit Loop If [ PatternCount ( $html ; "</html>" ) ]
End Loop 
# BEGIN PARSING
...

You might also want to add a counter to the loop and exit the script after n trials.

Note, however, that not all web pages are written in conformance with the standards. I have seen some that do not have the obligatory </html> closing tag. Examine the actual page source and see what can serve as a marker to indicate that enough of the page has loaded.

 

Link to comment
Share on other sites

This topic is 3193 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.