Home Answers Viewqa JavaScriptQuestions enable text box and label on selection

 
 


Arti Hajare
enable text box and label on selection
1 Answer(s)      2 years and 4 months ago
Posted in : JavaScript Questions

hello, Please tell me how to enable label and text box on selection of drop down list box. in drop down list box all values come from database. please reply.

View Answers

January 29, 2011 at 1:37 PM


Hi Friend,

Try this:

<%@page import="java.sql.*"%>
<html>
<script>
function ch(){
        document.getElementById('lab').innerHTML="Name";
        document.getElementById('txt').disabled=false;
    }
</script>
<form name="form">
<table>
<tr><td>Select</td><td><select id="sel" onchange="ch();">
<%
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("Select * from data");
while(rs.next()){
%>
<option value="<%=rs.getInt("id")%>"><%=rs.getInt("id")%></option>
<%
}
%>
</select></td></tr>
<tr><td><label id="lab" disabled="true"></label></td><td><input type="text" id="txt" disabled="true"></td></tr>
</table>
</form>

Thanks









Related Pages:
enable text box and label on selection
enable text box and label on selection  hello, Please tell me how to enable label and text box on selection of drop down list box. in drop down list box all values come from database. please reply
enable text box
enable text box  Dear all I would like to enable a textbox by clicking on a button. pleas ehelp me out how can i do this regards JV
selection box linked with textarea
selection box linked with textarea    function get_val(tot_val1... detals i have in db with all fields .. like wise i have names in selection box sham... database in textarea line by line onclick selected text: eg:select: anand
radio button selection should move the control to a text box that needs to be complete
radio button selection should move the control to a text box that needs to be complete  on selection of a radio button mouse should move to a particular text box that needs to be filled. How
Label
the functioning of the next text field. A label is also restricted to a single line of text as a button. The example below shows the significance of Label... Label      
interrelated two selection box
interrelated two selection box  hi i need two selection box .in 1 box all designation like manager, ceo etc , onclick on manager i should get list of managers names in second selection box.. like wise so on. from database
sir plz help in design a jsp page whichis as follow username [_____] select [__>]password [_____] after selection then onlypassword text box is visible
sir plz help in design a jsp page   sir plz help in design a jsp page which is as follow username [ _ ] select [ > ] password [ _ ] after selection then only password text box is visible
Label in Flex4
or more lines of uniformly-formatted text. Label in Flex4 utilize the new... pieces of non-interactive text. Spark Label displays text with uniform...Label in Flex4: In Flex4 Label is a lightweight and low level UI-component
How to show autocomplete textbox values on combo box option selection using database?
How to show autocomplete textbox values on combo box option selection using database?  When I select option(i.e First Year) then it will show list of student names in auto-complete text box
select box and text box validations
select box and text box validations  hi, any one please tell me how to set validations for select box and text boxes using bean classes? thank you   Please visit the following link: http://www.roseindia.net/jsp/user
Alert Box in Flex
Flex Alert Box Components Adobe Flex provides many types of components, in this tutorial we will study visual component. 1. Alert Box: In the present tutorial we will see how to display simple text using Alert Box. An Alert Box
Text box Checking
Text box Checking  I want to Write only the word A-Z in a text box What is the code
Scrolling List Box. - Java Beginners
. deleteButton.setEnabled(false); } else { //Selection, enable...Scrolling List Box.  How can is make a list box scrollable by using..._SELECTION); list.setSelectedIndex(0); list.addListSelectionListener
two text box problem
two text box problem  i have two text box in two different pages and same variable use in two text box when enter value in first text box it's reflection show in second text box , how i reduce it in jsf ?   Hi Friend
Inform user to enable JavaScript
Inform user to enable JavaScript   Hi sir How can we inform user to turn on JavaScript ? Because if we have implemented validation etc... Document </TITLE> <body> <script type="text/javascript">
Drop-down text selection in jsp/html
Drop-down text selection in jsp/html  Hi, I am trying to create JSP page where I have two drop-downs. There are two-sets of data - First set Categories- Movies, Books, Music and the Second set Genres- Action,Comedy,Romantic
java script text box
will click submit button the text should be submitted(it shows the value in alert). i also want the text box should generate in front of NEW button(next/prev...java script text box  hi, I created a button when i click
checkbox selection in jsp
checkbox selection in jsp  hey guys i am working on a web based... form. I want to select i check box from each row and also i want to avoid many check box in the same row. How can i get this one working? Can anyone help me
J2ME Label Example
J2ME Label Example       This is the simple create label example in which we create an StringItem to display the "UserId" as a label text. In the given application we
Struts2.2.1 label Tag Example
Struts2.2.1 label Tag Example The label tag is used to renders an HTML LABEL that allow to output <s: label name=? ? value=? ? /> combination that has... will shows how to implement the label tag in the Struts2.2.1 -- First we create
Image Selection - Swing AWT
Image Selection  Hi, I need to provide the image selection facility...; JButton saveButton; public DisplayImage() { super("Image Selection program... { String selection = (String)comboBox.getSelectedItem(); String
Text box control--keypress event
Text box control--keypress event  In my form have a text box...My requirement is... when is type characters in that box... before typing the 3rd character the space should come automatically or programmatically...the sturucture
Selection With Ajax and JSP
Selection With Ajax and JSP  I am working at a jsp page using ajax for country , state, city selection. so if he select country it will populate the state and city selection (both). After selecting country if he select city
Drag a Text Box into dynamic positions
Drag a Text Box into dynamic positions  Plz can anyone tell how can i drag a text box using mouse or arrow keys... Im doing a accounts projects and i need this feature for cheque configuration
auto complete text box - Ajax
auto complete text box  How to create auto complete text box in jsp using ajax technology ? plz giv me steps wise code
my table should be reseted to new value upon the selection of the combo box..
my table should be reseted to new value upon the selection of the combo box..  import java.awt.Container; import java.awt.FlowLayout; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.sql.Connection
Populate listbox according to selection value from another selectbox
Populate listbox according to selection value from another selectbox  ... listbox from database but campus list box will removes selected value.. please help...;script type="text/javascript"> function selectCity(){ var mid
Image selection instead of radio button very urgent.. - JSP-Servlet
button to select Emp ID which is getting populated in the text box of my home page successfully. But I need some icon or some pictorial selection instead...Image selection instead of radio button very urgent..  Respected Sir
Multiple select box
Multiple select box  Hi, I need help in code for multiple select box. The multiple select box should be populated with the db values.The selection done in the multiple select box is to be moved to the text area provided a add
To display suggestions in a text box - Ajax
, to get the suggestions i mean when i enter the alphabet in a text box(For ex:'A'), the names that starts from 'A' have to display in the text box... enter the character in A in the text box, The names that starts from A have
Dynamic check box problem
='enable_text()' name="check"> <td><input type="text" name="name...Dynamic check box problem  In my project i have used a dynamic table, in the each row of that table there is one check box [that i have created
JTree Multiple Selection
Enable and Disable Multiple Selections in a JTree Component... will learn how to enable and disable the multiple selections in a JTree... or disallow the permission for selection the more than one tree component at a time
Simple Text display
to display any text in a text input box using a button click. It is very simple... Simple Text display     ... that flex panel we have to use a button and a textinput box which are present
how to create a text box using awt
how to create a text box using awt  give an example how creat multi buttons & text boxes
J2ME Text Box Example
J2ME Text Box Example       This application illustrates how to create the text box using TextBox class. The TextBox class is a Screen that allows the user to enter and edit text
Enable and Disable Tab in Java
Enable and Disable Tab in Java       In this section you will learn how to enable... number. To enable or disable any tab you can use the setEnabledAt(int index
Automatically display in text box - JSP-Servlet
Automatically display in text box  Dear Deepak Sir, When i enter some text in text box.That corresponding value in database,the value display in another text box using ajax. Thanks & Regards, VijayaBabu.M
Auto Complete Text Box - JSP-Servlet
Auto Complete Text Box  Please help me in Aotocomplete text box code. I m a java programmer. I m working on jsp tech. please give me the code for Autocomplete text box in which the values will generate from database table
create text box by clicking button and submittong text in text box using submit
create text box by clicking button and submittong text in text box using... is created. and i want to do that when i enter the text input in text box and when i... box in SOP). i also want the text box should generate in front of NEW button
java swing-action on checkbox selection
java swing-action on checkbox selection  I am working in netbeans and mysql.On selecting a check box, the data from database must be retrieved. i need the action preformance of check box...could nybody?....if could...!thanks
How to assign a default value to text box in netbeans
How to assign a default value to text box in netbeans  I have a java application,and i want to assign a default variable to the textbox
how to make enable/disable textbox in while(rs.next)
; function enable_text(status) { status=!status; deptName...' onclick='enable_text(this.checked)'>"); //out.println("<...how to make enable/disable textbox in while(rs.next)  Hi, I'm trying
how to make enable/disable textbox in while(rs.next)
; function enable_text(status) { status=!status; deptName...' onclick='enable_text(this.checked)'>"); //out.println("<...how to make enable/disable textbox in while(rs.next)  Hi, I'm trying
how to get selected name from combo box
of worker name within d combo box and display that id into a text box. plz...how to get selected name from combo box   i have fetched all records of worker i.e worker name. on a test.jsp and dispayed it into combo box ...my
how to get selected name from combo box
of worker name within d combo box and display that id into a text box. plz...how to get selected name from combo box   i have fetched all records of worker i.e worker name. on a test.jsp and dispayed it into combo box ...my
Tomahawk selectOneLanguage tag
in selection box according to the locale. Code Description : ... : This attribute is used to set the label and value when displaying an empty selection...; <head> <meta http-equiv="Content-Type" content="text
how to display webservice response in a text box
how to display webservice response in a text box  Hallo, i have created a webservice and when i sended request to my webservice its sending proper response . the point is how to dispaly the response values in a text box usinj
Tomahawk selectOneCountry tag
in selection box according to the locale. Code Description : ...; <head> <meta http-equiv="Content-Type" content="text... example</title> <style type="text/css"> <!-- body
JSP Text Box properties. - JSP-Servlet
JSP Text Box properties.  How do I restrict a text box created in JSP page only for numbers.. example: I have a function something like this in actionscript UserID_txt.restrict = "0-9abc^d-zA-Z~!@#$%^&*()+_-'.,"; Do i have
Request[/searchMenu] does not contain handler parameter named 'function'. This may be caused by whitespace in the label text. - Subversion
Request[/searchMenu] does not contain handler parameter named 'function'. This may be caused by whitespace in the label text.  Hi, i am using... in the label text. jsp file = Search for - Shipping Category struts-config.xml

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.