What method are you using to display the value of the global variable?
Are you using a custom dialog or a "merge variable" on a layout?
Thank you for your post.
I am unable to replicate the issue. Here are the steps I performed:
1. I created a new table with a text field named "HTML".
2. On the layout, I sized "HTML" text field to be several lines long.
3. I added a Web Viewer to the right side of the layout, using the custom web address "http://www.filemaker.com". I left the other values as default ("Allow interaction with web viewer content, Display progress bar, etc.).
4. With the Web Viewer still selected, in Inspector -> Position, I named the Web Viewer "webMain".
5. I created a button on the layout that performed the "Set Field" script step, using the "HTML" field with the calculation:
GetLayoutObjectAttribute ( "webMain" ; "content" )
6. I went to Browse mode, added one record, clicked the button, and the results displayed in "HTML" text field.
7. I clicked "Products" tab, clicked the button, and the results changed in "HTML" text field.
8. I repeated step 7 with "Solutions" tab, "Products -> Demos", "Products -> What's New", "Solutions -> Consultants", etc. I could not get the previous value to display in "HTML" text field.
Let me know what I'm doing differently than you so I can replicate the issue.
Seems it's an issue with the one site I need to work with this. Not sure what they're running as a server or what the deal is with how the pages are rendered, but it works fine for any website other than the one I need.
Unfortunately, the page isn't mine; it's a timecard entry page for an accounting package (Clearview software's "InFocus"). Everything work fine in safari and other pages work fine in FileMaker. But THIS site seems to somehow make FMP "hang on" to the old content for a while. I may ask the vendor what they use for a server (IIS/Ajure I think). But it's the first site I've had give me trouble inside fmp since surveymonkey decided their multiple choice buttons wouldn't work in it.
Think I'm stuck between two companies who probably don't know each other well enough to figure it out. I'll see if I can find a workaround.
I discovered that if I click the button (that executes the Set Field step) before the new page finishes loading, there is no change. Once the web page finishes loading, then the correct information is put into the "HTML" text field when I click the button.
Is it possible that "InFocus" web page has not finished loading?