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 the use of namespace in php?

970


Tell me how to initiate a session in php?

1137


How to read one character from a file?

1088


Why php is used with mysql?

1010


Why do we use interface in php?

954


Why session timeout is important?

1107


Php error constants and their descriptions

1171


How to submit form without a submit button.

1051


how to detect a mobile device using php

1076


Why delimiter is used in mysql?

1060


What is php good for?

916


When is a conditional statement ended with an endif?

947


What is difference between session and cookies in php?

954


Which function is used in php to check the data type of any variable?

941


What are the differences between session and cookie?

1005