Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Javascript and forms
- From: javascript@xxxxxxxxxx (Peter Brunone)
- Subject: [Javascript] Javascript and forms
- Date: Mon, 16 Sep 2002 18:42:03 -0500
This is a multi-part message in MIME format. ------=_NextPart_000_000C_01C25DB0.BFF4E480 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit var myURL; myURL = http://myserver.com/image.php?sym= + document.formName.field1.value + "&A=" + document.formName.field2.value; window.open("windowName", myURL, etc); Cheers, Peter -----Original Message----- From: javascript-admin@xxxxxxxxxx [mailto:javascript-admin@xxxxxxxxxx]On Behalf Of Christopher J. Crane Sent: Monday, September 16, 2002 6:00 PM To: javascript@xxxxxxxxxx Subject: [Javascript] Javascript and forms I want to create a popup from a link. That part is simple... I want the URL of the popup to contain variables from a set of form fields. For instance, I want to popup a window when the submit button is pressed to go to http://my-server.com/image.php I want to add the following variables to the end from the 4 form fields that are contained within the form. Not all of the 4 form fields will contain data all the time. The end result should look something like this: http://my-server.com/image.php?sym=ikn&A=ibm&B=xrx&C=danky&D=rhat I would like the usual options when the popup is created, no scrollbars, a certain size and no address bar, no status bar ect.... The part I am stuck on is getting JavaScript to write the variables from the form to the end of the URL as it is shown above. Thank you in advance to anyone that can help me with this. ------=_NextPart_000_000C_01C25DB0.BFF4E480 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><SPAN class=3D310053523-16092002><FONT face=3DArial color=3D#0000ff = size=3D2>var=20 myURL;</FONT></SPAN></DIV> <DIV><SPAN class=3D310053523-16092002><FONT face=3DArial color=3D#0000ff = size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D310053523-16092002><FONT face=3DArial color=3D#0000ff = size=3D2>myURL=20 =3D </FONT><A href=3D"http://myserver.com/image.php?sym=3D"><FONT = face=3DArial=20 size=3D2>http://myserver.com/image.php?sym=3D</FONT></A><FONT = face=3DArial=20 color=3D#0000ff size=3D2> </FONT></SPAN><SPAN = class=3D310053523-16092002><FONT=20 face=3DArial color=3D#0000ff size=3D2>+ document.formName.field1.value + = "&A=3D" +=20 document.formName.field2.value;</FONT></SPAN></DIV> <DIV><SPAN class=3D310053523-16092002><FONT face=3DArial color=3D#0000ff = size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D310053523-16092002><FONT face=3DArial color=3D#0000ff = size=3D2>window.open("windowName", myURL, etc);</FONT></SPAN></DIV> <DIV><SPAN class=3D310053523-16092002><FONT face=3DArial color=3D#0000ff = size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D310053523-16092002><FONT face=3DArial color=3D#0000ff = size=3D2>Cheers,</FONT></SPAN></DIV> <DIV><SPAN class=3D310053523-16092002><FONT face=3DArial color=3D#0000ff = size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D310053523-16092002><FONT face=3DArial color=3D#0000ff = size=3D2>Peter</FONT></SPAN></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px = solid; MARGIN-RIGHT: 0px"> <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT = face=3DTahoma=20 size=3D2>-----Original Message-----<BR><B>From:</B> = javascript-admin@xxxxxxxxxx=20 [mailto:javascript-admin@xxxxxxxxxx]<B>On Behalf Of </B>Christopher J. = Crane<BR><B>Sent:</B> Monday, September 16, 2002 6:00 PM<BR><B>To:</B> = javascript@xxxxxxxxxx<BR><B>Subject:</B> [Javascript] Javascript and=20 forms<BR><BR></FONT></DIV> <DIV><FONT face=3DArial size=3D2>I want to create a popup from a link. = That part=20 is simple...</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>I want the URL of the popup to = contain variables=20 from a set of form fields.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>For instance, I want to popup a = window when the=20 submit button is pressed to go to <A=20 = href=3D"http://my-server.com/image.php">http://my-server.com/image.php</A= ></FONT></DIV> <DIV><FONT face=3DArial size=3D2>I want to add the following variables = to the end=20 from the 4 form fields that are contained within the form. Not all of = the 4=20 form fields will contain data all the time. The end result should look = something like this:</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> <A=20 = href=3D"http://my-server.com/image.php?sym=3Dikn&A=3Dibm&B=3Dxrx&= amp;C=3Ddanky&D=3Drhat">http://my-server.com/image.php?sym=3Dikn&= A=3Dibm&B=3Dxrx&C=3Ddanky&D=3Drhat</A></FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>I would like the usual options when = the popup is=20 created, no scrollbars, a certain size and no address bar, no status = bar=20 ect.... The part I am stuck on is getting JavaScript to write the = variables=20 from the form to the end of the URL as it is shown above.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Thank you in advance to anyone that = can help me=20 with this.</FONT></DIV></BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_000C_01C25DB0.BFF4E480--
- References:
- [Javascript] Javascript and forms
- From: Christopher J. Crane
- [Javascript] Javascript and forms
- Prev by Date: [Javascript] Javascript and forms
- Next by Date: [Javascript] Another popup question
- Previous by thread: [Javascript] Javascript and forms
- Next by thread: [Javascript] Another popup question
- Index(es):