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 |
How long is session timeout?
How can we execute a php script using command line?
For image work which library is used in php?
What are php expressions?
how long a default session stay in php?
Tell me is it possible to remove the html tags from data?
How does api connect to database?
What are the disadvantages of php?
Can php run on windows server?
How to submit form without a submit button.
What is isset and unset in php?
How to remove all duplicate values in array in php?