display selected value in dropdown list through javascript
without page refresh
Answer / rrajeswari
Try this code
<SCRIPT LANGUAGE="javascript">
<!--
function OnChange(dropdown)
{
var myindex = dropdown.selectedIndex
var SelValue = dropdown.options[myindex].value
var baseURL = <Some value based on SelValue>
top.location.href = baseURL;
return true;
}
//-->
</SCRIPT>
<select name=select1 onchange='OnChange(this.form.select1);'>
<option>Value 1</option>
<option>Value 2</option>
<option>Value 3</option>
</select>
| Is This Answer Correct ? | 11 Yes | 6 No |
What is meant by pear in php? What is the purpose of it?
What is the actually used php version?
What is difference between web service and api?
What is php limit?
Is php procedural or oop?
What are the differences between GET and POST methods in form submitting?
How to apply Cake php ajax pagination?
What do you mean range() in php?
What are classes in php?
Where is the functions php in wordpress?
What is the difference between the functions unlink and unset?
Tell us how to create an array of a group of items inside an html form?