NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: dmoyer on August 22, 2010, 11:54:56 AM

Title: How to force a script that uses the onload event
Post by: dmoyer on August 22, 2010, 11:54:56 AM
I have a web form that is a container for a browse.  I have an embedded script in the form that populates a google map that is based on the records in the browse.  This script fires when the form is loaded.  The google map is actually defined as a cell in the browse.

On the form, there is a set of radio buttons that changes the filter for the browse.  As I click on each radio button, the browse value is set to refresh, and that works great.  However, I cannot figure out how to force a reload of the form when that radio button is clicked.  If I reselect the form from the menu, the onload event fires and the script runs.

Is there a way to force a reload of the form when I click on a control on the form, so this script can re-plot the markers on the google map?  The script uses this syntax: 'window.onload = function()' (which avoids the need for the body tag to have the onload="functionname()" parameter.

Like I say, it all works great, I just need to figure out how to fire the window.onload event.

Thanks!
Dave
Title: Re: How to force a script that uses the onload event
Post by: kevin plummer on August 22, 2010, 07:08:05 PM
Try adding the script to this embed

      ! Start of "Generating Browse Field"
      ! [Priority 5000]

I actually add my script to a variable in this embed and then add the variable into the Javascript on the template for the cell.

Kev