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 if isset ($_ post submit )) in php?
What is MIME?
what is mean by portal
How to use the COM components in PHP?
Where to put php files in apache server?
What is the use of is_array() and in_array()?
Is java is better than php?
Tell me what is needed to be able to use image function?
What is a php certification?
What is php and sql used for?
Tell me how to find current date and time?
Explain about PHP filter and why it should be used?