954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

SELECT with INPUT field and then another select

Hello, been lurking around to see if I could find any kind of solution to what I'm trying to solve, but the closest thing I got was this old thread:

http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/313687

What I want

I'm trying to create is a SELECT menu with an INPUT field, but the INPUT field won't display before I select an option from the list. After I've selected an option I want two things to happen; the INPUT field displays and a new SELECT menu shows up with some other options.

Then in the last menu, where I create the options of course, theres a final option that finalizes the entire SELECT menu and gives them a button to submit it, and when they press it, all the options will just be printed along with what the user typed in the INPUT fields.

The problem

I have no idea how to automatically show the next SELECT menu, which I've created, but hidden, for the user with it's own text field, and then in the end make it possible to submit it to print all the selected options and whats typed in the INPUT fields.

I'm guessing I need some sort of jQuery/JavaScript, but I'm not very familiar with that.

What I'm asking

If you have the complete solution because you have solved a similar problem earlier, great, I would like to have it, but if you know the solution, you just need to point in the correct direction, but all kinds of help is appreciated!

Thanks.

mawk
Newbie Poster
2 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
 

Use the select's "onchange" event. When the user selects, you get control in the onchange handler. There you turn your next dropdown visible and give it focus. Give that one an "onchange" handler, too, and you're in business.

MartinRinehart
Junior Poster in Training
97 posts since Jun 2010
Reputation Points: 11
Solved Threads: 10
 

Thanks, I've looked that up, but as I said; I'm not very familiar with jQuery and it seems I need to have that to call the action of the next select menu.

Would you, or anyone else, care to give me a simple axample? Thanks.

mawk
Newbie Poster
2 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: