If the file that loads is generating an on load event that is fired twice, you might check if there is some logic in some custom js file that is inadvertently sending or handling the on load event. Sometimes, when adding third-party html pages to an application you have to check the js files for document load handlers that escalate their behavior up the document hierarchy.
If
pgGotoURL() is loading another ToolBook application, then you should be able to track this down more easily.
As a debug routine, try this with the
onFirstIdle() PowerPac function:
on load page
onFirstIdle( name of self, "trigger", 10000 ); discard return value;
Comment: Move all the on load page actions to the trigger event of this page.
The above function will load the page, detect idle + 10000ms, then fire the trigger event.
Point: Check whether the page loaded by pgGotoURL() gets loaded twice.
This should help you narrow down where the event duplication is originating.
Comment: It is good practice to make discretionary use of onFirstIdle() when loading multiple HTML pages.
This helps to keep tasks in proper sequence when complex applications are loading content.
Hope this helps. Of course, I may not be understanding your issue completely, but the above may still be useful to you or others.