cleary1981 Posted June 26, 2008 Share Posted June 26, 2008 Hi All, I thought this was going to be easy but theres alot more involved than I thought. I can't find an example of what I want to do. I have a drop down box that when a value is selected it should find the appropriate description from my db and display it in a span with id= description. Heres the snippet of code from my html. <div id="leftSide"> <fieldset> <legend>Module</legend> <FORM name="drop_list"> <label for="type">Type</label> <div class="div_texbox"> <SELECT NAME="Category" onChange="SelectSubCat();" > <Option value="">Select Type</option> </SELECT> </div> <label for="mod_named">Model</label> <div class="div_texbox"> <SELECT id="model" NAME="SubCat" onChange="updateDesc();" > <Option value="">Select Model</option> </SELECT> </div> <fieldset> <legend>Description</legend> <span id="description">description goes here</description> </fieldset> <label for="mod_name">Name</label> <div class="div_texbox"> <input name="username" type="text" class="username" id="username" value="" /> </div> <div class="button_div"> <input name="Submit" type="button" value="Generate" class="buttons" /> </div> </form> </fieldset> </div> I know i need javascript for the updateDesc() and some php to query my db. Can anyone shed some light on this for a frustrated newbie? Link to comment https://forums.phpfreaks.com/topic/111995-onchange-update-description/ Share on other sites More sharing options...
cleary1981 Posted June 26, 2008 Author Share Posted June 26, 2008 C'mon... no takers? :'( Link to comment https://forums.phpfreaks.com/topic/111995-onchange-update-description/#findComment-574937 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.