?
Solved

Dynamic Form Help Needed

Posted on 2007-08-01
11
Medium Priority
?
203 Views
Last Modified: 2008-01-09
I need to build a web form that's a bit more complicated than a static web form. I need a form with drop-down fields that are linked to each other. What I mean is this:

For instance, if CHOICE1 is selected in FIELD1, the FIELD2 needs to show certain choices. If CHOICE2 is selected in FIELD1, the FIELD2 needs to show some different choices.

I don't need these forms to write to a database, only to be emailed. How can this be done? Some clear, tutorials would be appreciated. Thanks.
0
Comment
Question by:isaacr25
11 Comments
 
LVL 11

Assisted Solution

by:Jeffrey Dake
Jeffrey Dake earned 400 total points
ID: 19614820
Sounds like you might want to use ajax to implement your solution.  Ajax will allow you to make an ansynchronous request which can serve up variations of your FIELD 2.

http://developer.mozilla.org/en/docs/AJAX:Getting_Started
0
 
LVL 14

Expert Comment

by:chinu1310
ID: 19614863
Do you want to go for some asp .net pages or want to stick with htmls only.
Becuase for dynamic pages you might have to move to any such server technology.
0
 
LVL 8

Assisted Solution

by:Ashutosh Vyas
Ashutosh Vyas earned 400 total points
ID: 19614897
Although AJAX would be the most elegant way of doing it. It all the more easier if you are using ASP.NET for development as we have Cascading Drop Down COntrols for that. For your reference, this might help you on this:

http://www.trans4mind.com/personal_development/JavaScript/tripleMenu.htm
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 3

Expert Comment

by:numbers1to9
ID: 19615367
Am I the only one not getting it?

You could (must) do this with JS. A XhttpRequest could be done if your option values are huge (ex. options 1 = 50+ options; option 2 = 50+ options), but if they are just a few options you could just write them in the original html code.

When you want to mail the values, just get the current form values and send them.

Why are you all talking about server side solutions?

When you are talking about "dynamic drop-down fields" (in the  JavaScript Zone) I assume you are talking about: http://www.felgall.com/jstip22.htm (see the example). Isn't this what you mean?
0
 
LVL 8

Expert Comment

by:Ashutosh Vyas
ID: 19615436
yes indeed the client side code is what should be added. The link I provided also says the same I guess........
0
 
LVL 3

Expert Comment

by:numbers1to9
ID: 19615499
Sorry ashutosh9910, you kind of lost me when you mentioned ASP.NET, dev. etc. (and at the samte time everybody else where also mentioning ASP).

But, yes the site you provided, although but-ass ugly, gives a JavaScript solution to dynamic drop down fields.
0
 
LVL 8

Expert Comment

by:Ashutosh Vyas
ID: 19615552
yeah I mentioned AJAX as a good solution PROVIDED he is working on ASP.NET.
0
 
LVL 25

Accepted Solution

by:
Rouchie earned 1200 total points
ID: 19615636
You could try this - no server side code needed!
http://www.dynamicdrive.com/dynamicindex16/chainedselects/index.htm
0
 
LVL 3

Expert Comment

by:numbers1to9
ID: 19615714
ashutosh9910: Why is "AJAX" a good solution when working with ASP.NET? Isn't it a good solution in general when dealing with large amounts of data (that needs to be processed client-side)?

Just to nit-pick: there was no reference to ASP; one could speculate on any technology used by the questioner.

I am not trying to bust any balls here, I'm just saying...
0
 
LVL 8

Expert Comment

by:Ashutosh Vyas
ID: 19615772
By Good solution I mean you can use the AJAX toolkit working with ASP.NET which has build in controls for this very purpose
check out

http://asp.net/ajax/control-toolkit/live/CascadingDropDown/CascadingDropDown.aspx

0
 
LVL 3

Expert Comment

by:numbers1to9
ID: 19615848
Yeah, that was pretty cool...

Anyway, I accept your apology and now I understand your reasoning.

Cheers M(2^3)!

0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question