Dynamic form creation

Discussion in 'Software' started by msteinblock, Jun 19, 2005.

  1. msteinblock

    msteinblock Private E-2

    I would like to create a form that is created dynamically from what the user selects on the previous field. Field A has three options. Depending on what option is slected is what options are listed in field B. Each of these fields are generated by a list from SQL. Can anyone stear me in the right direction? Do I use ONCLICK?

    Thanks for the help!

    Matthew
     
  2. Coco

    Coco Sergeant Major

    You'd use javascript to detect when the selection is made and then resubmit the page with the selected choice and then the code behind deals with what to show based on what was just submitted. This is an older way of doing things. It will work with any browser that supports forms (which is everything in use today). It's main draw back is people have to wait for the page to keep reloading. Which can be an issue if run off a slower server.

    Alternativly, you can use javascript to detect when the selection is made and then use layers to show diffrent choices upon diffrent selections. This solution has a few draw backs though. It requires all possible options to be loaded when going to the page. Not a problem if that isn't too much data. It also only works on newer browsers, olders ones have real issues with layers.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds