Muiter Posted February 14, 2010 Share Posted February 14, 2010 I have been helped great in this topic: http://w3schools.invisionzone.com/index.ph...showtopic=28491But now I have the dame problem in an for loop with an script found here: http://www.dhtmlgoodies.com/index.html?whi...ax-dynamic-listAny suggestions? Link to comment Share on other sites More sharing options...
Muiter Posted February 16, 2010 Author Share Posted February 16, 2010 Or is there any other way to use an ajax like dropdown menu in an list.This is my situation. I need (in an loop) a pulldown menu and when there is a item selected I want the corresponding value to be entered in an textfield so it can be changed if needed by the user. Link to comment Share on other sites More sharing options...
justsomeguy Posted February 16, 2010 Share Posted February 16, 2010 If you've got the same problem as in another script, wouldn't you use the same solution?If you want something to happen when you choose an item in a select element, there are a ton of examples of that online. You need to assign an onchange event handler to the select element which runs a function to get the value that was selected and set it as the value of a text input. I'm not sure where ajax comes into play, all you need is a form with a select element, text input, and submit button, and an event handler on the select element to update the text input when the value in the select changes.There's an example of the onchange event here:http://www.w3schools.com/jsref/event_onchange.asp Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.