B
Bill Steele
I want to have a window pop up with a form. When the form is submitted,
it needs to pass along the URL of the original window. If find on th
web eight gazillion descriptions of how to pass data from one page to
another via hidden fields, but not a word about how to pass that data a
second time.
I find that
<SCRIPT LANGUAGE="JavaScript"><!--
document.write(document.referrer);
//--></SCRIPT>">
will write the URL to the page.
<input type="text" value= "<SCRIPT LANGUAGE="JavaScript"><!--
document.write(document.referrer);
//--></SCRIPT>">
will place the referrer URL in a visible window, so
<input type="hidden" value= "<SCRIPT LANGUAGE="JavaScript"><!--
document.write(document.referrer);
//--></SCRIPT>">
should place the referrer in the hidden field.
But in both cases, the form does not pass the value on. It just passes
"<SCRiPT LANGUAGE="JavaScript..." etc. The browser accepts that as text,
but not as an element inside a form.
I also tried using document.write statements to write the entire form.
The browser doesn't believe it's a form.
So, how do I create a hidden form field with data from the referring
window?
it needs to pass along the URL of the original window. If find on th
web eight gazillion descriptions of how to pass data from one page to
another via hidden fields, but not a word about how to pass that data a
second time.
I find that
<SCRIPT LANGUAGE="JavaScript"><!--
document.write(document.referrer);
//--></SCRIPT>">
will write the URL to the page.
<input type="text" value= "<SCRIPT LANGUAGE="JavaScript"><!--
document.write(document.referrer);
//--></SCRIPT>">
will place the referrer URL in a visible window, so
<input type="hidden" value= "<SCRIPT LANGUAGE="JavaScript"><!--
document.write(document.referrer);
//--></SCRIPT>">
should place the referrer in the hidden field.
But in both cases, the form does not pass the value on. It just passes
"<SCRiPT LANGUAGE="JavaScript..." etc. The browser accepts that as text,
but not as an element inside a form.
I also tried using document.write statements to write the entire form.
The browser doesn't believe it's a form.
So, how do I create a hidden form field with data from the referring
window?