[Javascript] Javascript and forms

Peter Brunone peter at brunone.com
Mon Sep 16 18:42:03 CDT 2002


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 at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
Behalf Of Christopher J. Crane
  Sent: Monday, September 16, 2002 6:00 PM
  To: javascript at latech.edu
  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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20020916/e882775b/attachment.htm>


More information about the Javascript mailing list