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

Answer Posted / drorasta

you don't need to use AJAX for this. Just a simple
javascript:

<html>
<body>

<script type="text/javascript">
function showSelected(val){
document.getElementById
('selectedResult').innerHTML = "The selected number is - "
+ val;
}
</script>

<div id='selectedResult'></div>

<select name='test' onChange='showSelected(this.value)'>
<option value='1'>one</option>
<option value='2'>two</option>
</select>

</body>
</html>

Is This Answer Correct ?    375 Yes 116 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is inheritance in php with example?

1056


What is the use of 'print' in php?

1069


sort term descripttion form, report and uery

2234


What function do we use to find length of string, and length of array?

1015


What is php sequence?

985


What type of headers have to be added in the mail function to attach a file?

998


What are sql functions?

990


Is it more secure to use cookies to transfer session ids?

1011


What are variables in research examples?

1128


How do you debug php?

1028


When is a conditional statement ended with an endif?

998


How does php work with apache?

1124


Can php use gettext?

1084


What is the difference between php traits vs interfaces?

1032


What happens when submit button is clicked?

993