ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Scripts >> PHP
 
 


 

 
 PHP interview questions  PHP Interview Questions (658)
 ASP interview questions  ASP Interview Questions (251)
 CGI Perl interview questions  CGI Perl Interview Questions (76)
 JavaScript interview questions  JavaScript Interview Questions (174)
 VB Script interview questions  VB Script Interview Questions (342)
 JSP interview questions  JSP Interview Questions (100)
 Shell Script interview questions  Shell Script Interview Questions (158)
 Python interview questions  Python Interview Questions (5)
 Tcl interview questions  Tcl Interview Questions (19)
 Awk interview questions  Awk Interview Questions (6)
 AJAX interview questions  AJAX Interview Questions (24)
 Ruby on Rails interview questions  Ruby on Rails Interview Questions (21)
 Scripts AllOther interview questions  Scripts AllOther Interview Questions (48)
Question
display selected value in dropdown list through javascript
without page refresh
 Question Submitted By :: PHP
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
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 ?    385 Yes 101 No
Himanshu
 
Answer
# 2
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 ?    349 Yes 105 No
Drorasta
 
 
 
Answer
# 3
<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 ?    163 Yes 96 No
Dhir
 
Answer
# 4
<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 ?    96 Yes 54 No
Apeksha
 
Answer
# 5
one dropdown value are pass from another dropdown value with
javascript
 
Is This Answer Correct ?    76 Yes 57 No
Pinakini
 

 
 
 
Other PHP Interview Questions
 
  Question Asked @ Answers
 
Write a query to to delete duplicate rows?   4
What types of images that PHP supports?   2
what is the maximum size of databasi in mysql?   4
What is the difference between Reply-to and Return-path in the headers of a mail function?   2
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. Wipro 1
is php is the best for this situation   2
which is the best institute for php training near delhi & NCR......& what is the fee for the same....   2
How can I check if a value is already in an array? Rushmore-Consultancy 3
What will replacement of localhost username and password on submission a site   2
Describe the differences between the object models in PHP 4 and PHP 5.   1
what is the difference between mysql_fetch_array() and mysql_fetch_row()? Google 16
class Database { public static $_instance; public static function getInstance() { if(!isset(self::$_instance)) self::$_instance = new Database(DB_SERVER, DB_USER, DB_PASS, DB_NAME); print_r(self::$_instance); return self::$_instance; } } can any one explain "self::$_instance = new Database(DB_SERVER, DB_USER, DB_PASS, DB_NAME);" this line   1
 
For more PHP Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com