Refresh WebBrowserObject Display

Is there a command I’m failing to discover to force the WebBrowserObject to refresh?

I have one that is displaying HTML from a field, along with merged data. It doesn’t often refresh due to changed content though. ShowFields, ShowPage, Show have no effect. In fact, it often opens with nothing displayed. Sometimes if I toggle back and forth between the panels in GraphicsMode, clicking Apply and everything else, it will suddenly refresh and display what I expected.

How can I make it refresh when desired, in particular when the content changes?

Hi James,

I use either showvariables or the html is in a field. When it is in a field and I navigate to different records it updates automatically for me. The WebBrowserObject is set to formula, with no base url and then the field or variable in the Formula area. Depending how you are generating the html maybe showfields might help.

My HTML is in a field and the WebBrowserObject is set to Formula but I can’t get it to refresh. When it does happen to redraw, it displays everything perfectly.

Maybe in your case you might need to set the Base Url. In Pans Help file for the Web Browser Object it does say.

" The Base URL option is only for web pages that you generate on-the-fly, it does not apply to web pages loaded from the internet. The Base URL specifies the default location of files referenced in the HTML. (If the Base URL is left blank, it is automatically set to the folder containing the database.)"

Maybe the references to css, javascript etc arent being referenced correctly. In my use case it is all embedded into the html field with images having the complete url, no relative urls.

I have not tested this, but maybe it helps.

If you have named your Web Browser Object say “Browser” you can refresh (at least it worked for me in my experiment) by using something like:

changeobject "Browser","Formula", theFormula

The theFormula is a variable containing the current formula which means you don’t need to actually change the formula for the update. Wait, let’s see if we can further automate this and just use whatever the current formula might be.

changeobject "Browser","Formula", objectinfo("Formula")

This seems to work as well.

I have it working now but I don’t know why.

My work was being done on Catalina and I spent a long time trying to resolve those issues. A short time ago I moved the files to a computer running El Capitan and right from the start every change in the data was immediately reflected. I moved the files back to the Catalina machine and now its working there as well. ?? The simple act of editing data or changing records is all that’s required for it to refresh. Did El Capitan do something differently in saving?

I don’t know if field names in chevrons should be replaced by data since my source for the HTML is a field. When I was struggling with the display it did do the merge once, but not again.

Whether I have the Magic panel set to Formula or Literal Text mode, the result is exactly the same. The HTML source is 100% from within the linked field, no external style sheets or javascript.

Pushing on…

That’s how it is supposed to work. It’s just like a Text Display object. I have no idea why you were having trouble.