Jump to content
Sign in to follow this  
jeremy rey

trying to pull HTML from web viewer

Recommended Posts

By giving my web viewer an object name, I have sucessfully pulled the HTML from it for the first HTML page that loads. My web viewer is loading based on a field -- where the URL is typed in.

I use the following functions:

to get HTML:

GetLayoutObjectAttribute ( "dataviewer" ; "content" )

to get the URL of the current page:

GetLayoutObjectAttribute ( "dataviewer" ; "source" )

Here's the wierd part though.

if I load my first page A.html and then run the two functions above, it works perfectly. I can extract the HTML and the URL and store it in a field.

however, if I navigate to page B.html from A.html using the web viewer and then run the functions above, it grabs the new URL just fine. But the HTML

it grabs is that of the first page. It's odd behavior and I can't figure out what the problem is. Anybody have this problem and/or advice on what to do?

Once I'm at page B.html and run the functions, I want to get the HTML from page B.html, not A.hmlt.

thanks,

Jeremy

Share this post


Link to post
Share on other sites

This statement "run the functions" does not really tell us exactly how you're using them. So we don't know what are doing to with the functions. They could be in calculation fields, in which case they would need to be "unstored" ([x] Do not store), and you'd likely need to click into them to see them change. Or they could be in a script, in which they should change. So I'm guessing you have them in calculation fields, but they are stored.

Share this post


Link to post
Share on other sites

Check the source for html page A close. It may be that page b is created by page A. I know a couple of websites (usps.com for one) where I have found this to be the case. The result is that you can grab the information from a second web page (not navigated to yet) from the first page (all info for the new window was there.)

Just a thought.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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