display selected value in dropdown list through javascript
without page refresh

Answer Posted / apeksha

<HTML>
<BODY>

<SCRIPT>
function getSelect(s)
{
return s.options[s.selectedIndex].value
}
</SCRIPT>


<SELECT NAME="list" OnChange="location=getSelect(this)">
<OPTION value="#"> Choose a search engine
<OPTION value="http://www.yahoo.com"> Yahoo
<OPTION value="http://www.lycos.com"> Lycos
<OPTION value="http://www.excite.com"> Excite
</SELECT>


</BODY>
</HTML>

Is This Answer Correct ?    102 Yes 58 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is php front end?

510


How to replace a text in a string with another text in php?

522


What is factory pattern in php?

499


How to include a file to a PHP page?

591


Does php require a web server?

517






Is age a variable in research?

492


How can I embed a java program in php file and what changes have to be done in php.ini file?

511


How to implement a class named dragonball. This class must have an attribute named ballcount (which starts from 0) and a method ifoundaball. When ifoundaball is called, ballcount is increased by one. If the value of ballcount is equal to seven, then the message you can ask your wish is printed, and ballcount is reset to 0. How would you implement this class?

637


Tell me in php, objects are they passed by value or by reference?

539


How we get ip address of client, previous reference page etc?

566


How can I find my php version?

549


What are the advantages of php mysql?

521


What is a class in php programing?

2007


What does explode do in php?

558


Write a statement to show the joining of multiple comparisons in php?

536