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 env in laravel?
What is meant by MIME?
Which software is best for php?
How to link one site backend to another site frontend?
How to convert a string to lowercase in php?
How can we destroy the session, how can we unset the variable of a session?
What are the differences between PHP3 and PHP4 versions?
What is variable and data type?
How can you increase the maximum execution time of a script in php?
Hello Friends,I am seeking for a job in php having 9 months. exp.Please suggest any company openings.
Is php 5.6 secure?
How can we extract string ?allinterview.com ? from a string ?http://info@allinterview.com? using regular expression of PHP?