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

Answers were Sorted based on User's Feedback



display selected value in dropdown list through javascript without page refresh..

Answer / himanshu

for this purpose we have to use ajax via we call another php
file which make the string of dropdown list

Is This Answer Correct ?    405 Yes 109 No

display selected value in dropdown list through javascript without page refresh..

Answer / 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

display selected value in dropdown list through javascript without page refresh..

Answer / dhir

<html>
<body>

<script type="text/javascript">
var show
function showSelected()
{
show
=document.me.test.options[document.me.test.selectedIndex].value;

document.write(show);
}
</script>
<form name="me">
<select name='test' onChange='showSelected()'>
<option value='1'>one</option>
<option value='2'>two</option>
</select>
</form>
</body>
</html>

Is This Answer Correct ?    169 Yes 102 No

display selected value in dropdown list through javascript without page refresh..

Answer / 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

display selected value in dropdown list through javascript without page refresh..

Answer / pinakini

one dropdown value are pass from another dropdown value with
javascript

Is This Answer Correct ?    80 Yes 60 No

Post New Answer

More PHP Interview Questions

we have two tables first one is EMPLOYEE having EmpID, EmpNAME, Second table is SALARY table having id, salary Write a query to get name of those person who having more than 10000$ salary

3 Answers   Net Solution,


What is difference between static and final in php?

0 Answers  


What is the difference between md5(), crc32() and sha1() crypto on php?

0 Answers  


Explain me what is the difference between $_files['userfile']['name'] and $_files['userfile']['tmp_name']?

0 Answers  


Is it easy to learn wordpress?

0 Answers  


hi guys..i m new to php..and want to learn it including the oops concept...can anybody send me some good programming bases exercise or a small learning project on it at nitsl_a@yahoo.co.in.I know html and going thru some of its websites.But about to go on it practically.plz advice.

1 Answers   College School Exams Tests, Satas, Wipro,


Code to open file download dialog in PHP?

0 Answers  


What is the default session time in php?

0 Answers  


What is csrf token in php?

0 Answers  


How many records can be stored in mysql table?

0 Answers  


How to open a file for reading?

0 Answers  


Php error constants and their descriptions

0 Answers  


Categories