You should change that to:
displayOptions); return false;"
and in your displayOptions make your overlib call followed by the OptFetch
. . . );
The OLgetAJAX call sets up an asynchronous http request
via the XMLHttpRequest object (or its ActiveX predecessor in IE6 and
older). Whenever the http response arrives, its responseText in loaded
into the OLresponseAJAX global and the OptFetch function is called. The
initial overlib call in that function then loads the global into the DHTML
popup, so that it becomes part of the document, that's when you want to make the
OptFetch call to copy your hidden input's data into the popup content.
With what you had, when you stepped with Firebug you caused a delay such
that the asynchronous request was completed and the DHTML popup
was loaded before the OptFetch call was made, and so it worked, but otherwise
the OptFetch call occurred too soon and you instead got an error with the
associated message indicating that an element with id="optDup" doesn't exist
(yet, because the overlib call had not yet been made).
----- Original Message -----
Sent: Tuesday, April 01, 2008 1:40
Subject: Re: [OLmws] Populate Popup with
data from hidden fields
Ok I now call it with
OptFetch(); return false; "
This triggers the
function to copy the hidden fields. Now I get a
document.getElementById("optDup") has no properties
is the first line of
If I set a breakpoint using firebug and single step it, it all
What could be going