Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing FORM variables to JAVA popup script

Status
Not open for further replies.

Kenfng

Technical User
Feb 11, 2001
4
FR
I'm having trouble with passing varibles in FORMS to a javascript. I would like to know how I should create the popup window to accept the variables and pass it on to the next page.

<SCRIPT LANGUAGE = &quot;JavaScript&quot;>
function ShowDetails()
{
window_handle=window.open(&quot;DetailsWindow.cfm&quot;, &quot;DetailsWindow&quot;, &quot;width=550, height=570&quot;);
window_handle.focus();
}
</SCRIPT>

<FORM ACTION=&quot;javascript:ShowDetails()&quot; METHOD=&quot;post&quot;>
<INPUT TYPE=&quot;hidden&quot; name=&quot;refno&quot; value=&quot;#refno#&quot;>
<INPUT TYPE=&quot;hidden&quot; name=&quot;date&quot; value=&quot;#strtdt#&quot;>
<INPUT TYPE=&quot;hidden&quot; name=&quot;det&quot; value=&quot;#detcause#&quot;>
<INPUT TYPE=&quot;submit&quot; VALUE=&quot;Details&quot;>
</FORM>

I have a page which will read these values. I have tried using the <FORM ACTION=&quot;details.cfm?refno=&quot;#refno#&quot; ... but this will show all the variables being passed.

Any help will be greatful. Thanks in advance.
Kenneth
 
Kenfng,

with javascript you can (in the New Window) refer to the form fields in the callin template like this ...

opener.document.formname.fieldname.value

dont bother submitting forms for what your doing ... just use hidden fields and that href java pop up from the other thread ..that should work fine

Marc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top