Dynamic Forms

  • HaydenJW
  • Novice
  • Novice
  • No Avatar
  • Joined: Jun 09, 2005
  • Posts: 28
  • Loc: Deadwood, South Dakota
  • Status: Offline

Post November 6th, 2009, 1:56 pm

Hello everyone,

I've done some searching on the forum but I haven't been able to find anything that answers this question:

Is it possible through JavaScript to make a form made up of 3 drop-down inputs that each subsequent inputs is based off the input of the prior. I would like to have users be able to select the year of the automobile they are looking for; then, have the list of all makes available in that year; then, all the makes from that Year and Make. Then, submission will be sent to an ASP server, eventually getting them to a page for that specific car.

Thanks in advance,
Hayden
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post November 6th, 2009, 1:56 pm

  • mk27
  • Proficient
  • Proficient
  • User avatar
  • Joined: Jun 09, 2009
  • Posts: 278
  • Status: Offline

Post November 8th, 2009, 1:05 pm

Of course. You can check the value of an element:
Code: [ Download ] [ Select ]
document.getElementById('myinput').value

And work from there.

You may want to look here:

http://www.javascript-coder.com/javascr ... t-form.htm
Image
  • Bogey
  • Disturbed
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 7127
  • Loc: Ozzuland
  • Status: Offline

Post November 8th, 2009, 10:01 pm

Here is a sample that you could use to learn, or just use.

http://javascriptkit.com/script/script2/multiplecombo.shtml
Learn PHP | I got 10 PHP tutorials! Check them out!
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.

Post November 9th, 2009, 2:50 am

I have done this before ... not with cars, but something similar ... I used jQuery's ajax calls to call in data from a database dynamically into a form ... http://www.jquery.com
RewriteEngine On

RewriteRule ^(awesome|excellent|extraordinary)$ RT

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 116 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2009. Driven by phpBB © 2001-2009 phpBB Group.