www.webdeveloper.com
Results 1 to 4 of 4

Thread: Hard problem on forms and JS

  1. #1
    Join Date
    Mar 2010
    Posts
    3

    Hard problem on forms and JS

    Hey there folks. I have a task regarding forms and JavaScript. I've been reading for the past couple of weeks, but didn't find a popper solution to the task, here it is:

    I have a form. Once the user clicks on the first <select> menu, second <select> menu must appear. After the user has clicked on the second <select> menu a final input field must appear. It goes like this:

    Choose car type: car1,car2,car3...carN

    After the user has chosen car type: engine1,engine2,engine3...engineN

    After the user has chosen the engine: the price of the car appears.

    After all of the inputs are completed a script takes the data and sends them to a given mail.

    I've had some success with usableforms(quirksmode), but I don't know how to "extract" the price, since there are a lot of fields. Any suggestions are welcome.

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Sounds like you are using mailto rather than a server-side script where you wouldn't have the problem.
    Post the document or a link
    At least 98% of internet users' DNA is identical to that of chimpanzees

  3. #3
    Join Date
    Mar 2010
    Posts
    3
    http://treniram.com/ins/jstest.html Here is the test page. It only uses JS for the Usable Forms. I haven't got to the point where I need the data, I don't know how to get the data from the 3rd input field.

  4. #4
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Code:
    document.getElementById('lname').value
    // or 
    document.forms[0].lname.value
    At least 98% of internet users' DNA is identical to that of chimpanzees

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles