loading a new form with ajax
i have a combo box what i want is whenever a new option from combo box is selected new form is loaded below开发者_开发技巧 the combo box with out refreshing the page can some one provide the script
Yes download the jQuery and you can simpley do with jQuery/Ajax.
<select onChange="$('#formDiv').load(this.options[this.selectedIndex].value)">
<option value="/pages/form1.html">form1</option>
<option value="/pages/form2.html">form2</option>
</select>
<div id="formDiv"></div>
This is basic structure I gave, You can enhance it to work it in more secure way.
精彩评论