Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


display selected value in dropdown list through javascript
without page refresh



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

Post New Answer

More PHP Interview Questions

How to Define a Constant in PHP? Is $ symbol necessary?

6 Answers   Maples,


How can we determine whether a php variable is an instantiated object of a certain class?

0 Answers  


How do you pass a variable by value?

0 Answers  


Explain about getters and setters in php?

0 Answers  


Explain how to execute a php script using command line.

0 Answers  


What does the arrow mean in php?

0 Answers  


Which is better python or php?

0 Answers  


What does csrf token mean?

0 Answers  


Is php good for career?

0 Answers  


How to convert a character to an ascii value?

0 Answers  


what is the url rewriting?how to rewrite the url? give any example

1 Answers  


What are the differences between PHP3 and PHP4 and PHP5? what is the current stable version of PHP?

0 Answers  


Categories