SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Passing dynamic form values to Javascript

    I am new to javascript and am not sure of how to do something.

    I have a form that has been dynamically created from PHP. It is basically a calculator and the number of form elements as well as names of the elements can vary greatly.

    I basically want to add a button that will open a new browser window with the form info being passed to it. Basically it will create a quotation for the customer that is suitable for printing.

    The only way I know to do the popup window is with javascript (unless php can do it). I know how to access form elements with javascript if the form element exists, but given most of the elements may change, I do not know how to access them.

    Any ideas.

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    How would you know what to pass and what to put on the quote if you don't know anything about the form elements? It can't be as dynamic as it sounds, unless you purposely designed it to be impossible to work with


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •