displaying section in the jsp based on the sected value in drop down

View Answers

June 16, 2008 at 8:06 PM

Hi friend,

<html>
<title>drop dwon list using javaScript</title>
<head>
<script type="text/javascript">

function favTechnology(){
var mylist=document.getElementById("myList");
document.getElementById("favorite").value=mylist.options[mylist.selectedIndex].text;
}
</script>
</head>

<body>
<table border="1" width="50%" bgcolor="pink" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<form method="POST" >
<h2 align="center">Drop Dwon list</h2>
<table border="1" width="100%">
<tr>
<td width="50%"><b>Select your Technology:</b></td>
<td width="50%"><select id="myList" size="1" onchange="favTechnology()">
<option>Java Tutorial</option>
<option>JSP</option>
<option>Servlets</option>
<option>Strust 2.0</option>
<option>JavaScript</option>
<option>HTML</option>
<option>XML</option>
<option>JDBC</option>
</select>
</td>
</tr>
<td width="50%"><b>Your favorite Technilogy is:</b></td>
<td width="50%"><input type="text" id="favorite" size="20"></td>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>


----------------------------------------------------------

Read for more information,

http://www.roseindia.net/jsp/

Thanks

Roseindia Team.









Related Tutorials/Questions & Answers:
displaying section in the jsp based on the sected value in drop down - Java Beginners
displaying section in the jsp based on the sected value in drop down   Hi friend, i have one problem in my jsp. i.e i have to display section on the jsp based on the selected value in the drop down list using java script code
jsp code for a drop down box to retrive value from database
jsp code for a drop down box to retrive value from database  my project needs to get the value from database in to the drop down box..... pls give me code for that ..... tan q   1)login.jsp: <html> <script>
Advertisements
how to set a value of dynamic number of drop down lists on a jsp page and access it value on another jsp page
how to set a value of dynamic number of drop down lists on a jsp page... number of drop down lists(depending upon number of books in that category) on jsp... ,rating2......number of buks in that category(and each drop down list has value
how to retrieve the id value itself from the access database to drop down listbox in jsp
how to retrieve the id value itself from the access database to drop down... access database to drop down list box in jsp...plz send the code for that.....plz   <%@page import="java.sql.*"%> <select> <option value
jsp drop down-- select Option
jsp drop down-- select Option  how to get drop down populated... a country:</b>&nbsp;</td> <select name="sel"><option value... = results.getString(2); String id = results.getString(1); %><option value
JSP Dependent Drop Down Menu
JSP Dependent Drop Down Menu  Hey Guy/Gals! I need someone help to guide me in creating a drop down menu, where the first menu affects the second... guessing I will need to use JSP + AJAX to make this dynamic. Can anyone please
jsp drop down without refresh - JSP-Servlet
jsp drop down without refresh  Sir I have tried two depenedent jsp dropdown in jsp page,But the probleam is when i select first drop down its... jsp same probleam also arise. Please tell me how to use the drop down without
drop down box - JSP-Servlet
drop down box  when i enter some letter in the input box,the corresponding words of that particular letter must be displayed below as a list from the data base in the same input box as drop down. Thanks&Regards, VijayaBabu.M
Drop down and radio button value on edit action
Drop down and radio button value on edit action  HI, I have a title field and a payment type field for title i have used drop down with values... the value from dropdown and radio button.. But the problem goes with edit action
Drop-down text selection in jsp/html
Drop-down text selection in jsp/html  Hi, I am trying to create JSP.... Now the first dropdown will have all the values. The second drop-down depends upon... such dynamic dropdowns. Also based on the values selected in the drop-downs, I should
dependent drop down box - JSP-Servlet
dependent drop down box  haloo sir Please give me the solution how to extract data from dependent drop down box with page refresh...; window.location.replace("http://localhost:8080/examples/jsp/dependentDropdown.jsp?id="+cid+"&&value
to access value of drop down value in beans when dropdown is populated using ajax
to access value of drop down value in beans when dropdown is populated using ajax  i want to access value of dropdown box in beans .. and this drop down was filled using ajax. plz help
to update drop down list value when selected from website
to update drop down list value when selected from website  hi help me, i want to insert value into db when i select from a drop down list... value="">--- Select ---</option> </div> <?php mysql_connect
to update drop down list value when selected from website
to update drop down list value when selected from website  hi help me, i want to insert value into db when i select from a drop down list... value="">--- Select ---</option> </div> <?php mysql_connect
to update drop down list value when selected from website
to update drop down list value when selected from website  hi help me, i want to insert value into db when i select from a drop down list... value="">--- Select ---</option> </div> <?php mysql_connect
Drop Down reload in IE
Drop Down reload in IE  Hi i was using two drop down box..One for Displaying date followed by another for Dispalying Month..If i Select/Change Month from the 2nd drop down then the 1st drop down ( which is date) automatically
jsp login code ... when username , drop down box and password is correct
jsp login code ... when username , drop down box and password is correct  i need a jsp code for login.... when username password and dropdown box value is correct.... the drop down box values should be retrieved from database
retrive the data from access database to drop down list box in jsp
retrive the data from access database to drop down list box in jsp  hai, im new to jsp now im using the jsp along with access database.in table i load all the data's i need to retrive the data from database to dropdown list box
drop down
drop down  how can i add data from choice/dropdown component of java awt to myaql table
Drop Down
Drop Down  How to insert date into database using dropdown like facebook
dynamic drop down list
dynamic drop down list  I want to create 2 drop down list, where it takes value from database and the two list are dependent..means if I select... on the value chosen from the previous. want code in javascript and jsp, Can you help
How to pass parameter through drop down list using session management in jsp??
How to pass parameter through drop down list using session management in jsp??  How to pass parameter through drop down list in the URL and access it on same jsp page using session management
validation for drop down list
validation for drop down list  Hi all I have a form, it contain 12 drop down list. Each drop down has 1 to 5 values,i need to validate this form. the following condition should be true. 1.you can choose only 3 times 5 value. 2
drop down menu
drop down menu  drop down menu using html
Login With Drop Down
Login With Drop Down   Hi all, I am doing a project using JSP. My... a drop down list consisting of Customs and Accounts. I have user accounts of both the departments. Now, my intention is to select the department from the drop down
dynamic drop down
into the designation drop down (use jsp+javascript+servlet) reply soon   1...dynamic drop down   I have created 2 drop downs in jsp.1...; <select onchange="showDesig(this.value)"> <option value="none
drop down list in Struts
drop down list in Struts  How to create a drop down list in Struts
Pls provide me jsp code to get values in drop down list from another table's field....
Pls provide me jsp code to get values in drop down list from another table's field....  my project has customer registration and company registration... in customer registration page and should be shown in drop down box in front end
Drop down combos
Drop down combos  Hi.. How to write a javascript for linked combo... = document.createElement("option"); option.setAttribute('value',i+1); option.innerHTML...="combo1" onchange="change(this);"> <option value="0">-Select-</option>
Drop down menu
Drop down menu  I have drop down list of some 14 links which links to the table,If i click each link the table should display below the link and again if i click the link the table should not appear. please help me
Drop down menu
Drop down menu  I have created a drop down list of links which links to a table but if i click the link the table display in the other page i want to display it in the same page.Please tell me the solution
Drop Down Box
Drop Down Box  In a Drop Down box I want to show the user All the Country In the World. And when he type A-z,then each of the type Show those country which start with those word. Like I For-India
Drop Down Reloads again in IE..How to prevent this?
Drop Down Reloads again in IE..How to prevent this?  Hi i was using two drop down box..One for Displaying date followed by another for Dispalying Month..If i Select/Change Month from the 2nd drop down then the 1st drop down
Excel Cell Drop Down List
Excel Cell Drop Down List In this section, you will learn how to validate data entered in a cell and provide a drop down list of possible values to the user... in a excel sheet's cell and also can provide drop list of possible value
Dependent drop down list
Dependent drop down list  hi,i am trying to design a form on which 2 dependent drop down list is used my code is successful but when i select class from first drop down list all the data get lossed means the value entered
Ajax drop down and textbox
Ajax drop down and textbox  hie frnds I have a dropdown menu in the 3...(this.value)"> <option value="none">Select</option> <option value="1">1</option> <option value="2">2
Get values in drop down list
Get values in drop down list  Pls provide me jsp code to get values in drop down list from another table's field. my project has customer... in drop down box in front end..... pls provide me code.. thanx
Displaying Date in jsp - JDBC
Displaying Date in jsp  I want to insert Date of birth of a person in a database.i am getting input value from HTML and i use jsp application to interact with database.My JSP code for inserting Date is below: String dateStr
Dependant & dynamic drop down list
Dependant & dynamic drop down list  I don't know this should be in this or AJAX forum. I have one dynamic drop down list from data base (working... on the values selected by user in first drop down list. How to achieve this ?   
drop down php mysql - PHP
drop down php mysql  PHP Script required to show the similar drop down item in each menu without refreshing the page. Is it possible if yes how
jQuery Simple Drop Down Menu
jQuery Simple Drop Down Menu In this section, you will learn how to develop a simple drop down menu using jQuery. To develop a drop down menu we put...;title>jQuery Simple Drop Down Menu</title> <meta name="keywords"
store values of drop down list box in database
store values of drop down list box in database  how to store values of drop down list box in oracle database in jsp?I have information inserting form where i have date of birth as drop down list box
Drop down for search textbox like google search
Drop down for search textbox like google search  I want drop down... with that are displayed). when the drop down list appear, then we can select one of word as our text box value. Thanks in advance
Displaying image using jsp and spring.
Displaying image using jsp and spring.  how to display an image stored in WEB-INF/images folder on the browser using jsp and spring
Drop down list from database
Drop down list from database  Hi, Can I know how do we get the drop down list from database? Eg: select country--select state--select district--so...)"> <option value="none">Select</option> <
html menu button drop down
html menu button drop down  How to create a menu button in HTML?   <select id="category"> <option value="1">One</option> <option value="2">Two</option> </select> <select id
Sitemap JSP Tutorial Section
Map | Business Software Services India JSP Tutorial Section  Intro..._TO_REPLACE_1 JSP Versions / Fundamentals Section Features of JSP 2.1 | New... a Property value in jsp | Error testing in JSP | Multiple form in Jsp | Bank
Name Displaying - JSP-Servlet
enter some value in text that value is already in database dispaly the alert box(i.e the value is already existing in db) Thanks&Regards, VijayaBabu.M...("username").value; var url = "AJAXCheckUserServlet?username=" + username
Displaying Rows - JSP-Servlet
Displaying Rows  Hi, I need your support on how to display data from ms sql 2000 database into an html form text box and text area, using java servlet or jsp  Hi friend, This is form code, display data
Login With Drop Down, Having Departments in different table
Login With Drop Down, Having Departments in different table  Hi all... the HTML page in such a way the I have a drop down list consisting of Customs... is to select the department from the drop down box and then login to the page. I