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 (659)
 ASP interview questions  ASP Interview Questions (251)
 CGI Perl interview questions  CGI Perl Interview Questions (76)
 JavaScript interview questions  JavaScript Interview Questions (175)
 VB Script interview questions  VB Script Interview Questions (343)
 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
 
Hello Friends,I am seeking for a job in php having 2yrs. exp.Please suggest any company openings.   1
what is constructor in a class, how it is work, how it is call?   2
Hi, I want to upload an image ito database and display image in a table in php how it is possible   2
How can I loop through the members of an array? Rushmore-Consultancy 1
What is the difference between the functions UNLINK and UNSET? Silicon-Biztech 8
What is the difference between InnoDb tables and MyIsam Tables in php   1
How can we know that a session is started or not? Rushmore-Consultancy 3 why we use @symbol before the variable HCL 3 How can you insert javascript in php code? TCS 9 How can you parse files that were not ending with .php by using Apache? 1 What is the difference between InnoDb tables and MyIsam Tables in php 1 Hi all, I have a problem in Apache on windows xp.I tried to unistall apache and install it again. But when in did the installation again, and tried to run apache, i get the following error message, Socketaddresse can just be used once. Make_sock: could not build to address 0.0.0.0.80 No listening sockets available.Shutting down Unable to open logs. and i also get (error) OS2. The system cannot fine the installed service named "Apache2". Please i need some one to help me out with this.I'm really fustrated cuz i need this stuff working as fast as possible. PLEASE HELP ME 2 1.Where are the sessions storing ? 2.What are the contents of a session file ? 3.If the server is loaded with too many session files there is a possibility of server crash. How can we solve this issue? 4. How does php server identify that the particular session belongs to particular user ? For ex: If two users A and B logged from different machine, separate session files (say 1 and 2) will be created in the server. But how the php knows that 1 belongs to A and 2 belongs to B ? TCS 3 How to send Email using PHP with MySQL in Linux Server?.. 3 Write a query to to delete duplicate rows? 3 How i can integrate merchant payment get way in zen cart? in php? plz help me BA-Continnum-Solutions 1 how to maintained the session from one page to another page based on the url and then entered into the first page is logging into instead of secondpage it goes to the another url.ie first login session togoes to the one url and next login session it goes to another url how is it possible in php please give me answer in that question iCynergy 1 Is there a way to encrypt text from php? 4 What’s the difference between sort(), assort() and ksort? Under what circumstances would you use each of these? 1 Write the code for upload a video file in PHP.How will You Play this in Your Page.? Convex-Digital 2 how to select the multiple data in selection button xasis-technologies 1 what are the current or latest versions of LAMP ? Linux, Apache, MySql, PHP 3 WWhat is the functionality of md5 function in PHP? 6 how php works with oracle? 1 what mode to use when creating dirs with mkdir? 1 How to upload a file (may be a .txt or a .doc file) from a php script/file? 1 For more PHP Interview Questions Click Here Copyright Policy | Terms of Service | Help | Site Map 1 | Articles | Site Map | Site Map | Contact Us | interview questions urls External Links HCL 3
•What is the difference between “mysql_fetch_array” and “mysql_fetch_object? Infotech 2
What is the salary for php developer(Fresher)?   1
what will do ceil() and floor() in PHP?   5
I am working in VFP with no knowledge of web programming.I want to learn web database programmin. Can I choose PHP and MYSQL for that?   2
How to upload and play video in Php when u r in localhost? HCL 3
 
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