Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JavaScriptQuestions How to hide and show some field on a radio button click

Have Programming Question? Ask it here!
 
 
 


Nilima Avinash Raut
How to hide and show some field on a radio button click
0 Answer(s)      2 years and 9 months ago
Posted in : JavaScript Questions


This is my code part:-

PAYMENT DETAILS
 <table cellpadding="0" cellspacing="0" align="center" border="5" bordercolor="#003333" align="center" width="70%">
     <tr>
       <td width="25%">
          <b class="label">Payment Type<b>
       </td>
       <td width="40%">
        <INPUT TYPE=radio NAME="payment_method" VALUE="cash" CHECKED><b class="label">By Cash</b></input>
         <INPUT TYPE=radio NAME="payment_method" VALUE="cheque" onclick="return payment();"><b class="label">By Cheque</b></input>
       </td>  
       <td>
          <b class="label">Payment Date<b>
       </td>
       <td>
      <jsp:include page="calendar_1.html" />


       </td>       
     </tr>
     <tr rowspan="4">
       <td>
          <b class="label">Cheque Number<b>
       </td>
       <td>
            <input type="text" value="" name="chqno">
       </td> 
        <td>
          <b class="label">Bank Name<b>
       </td>
       <td>
            <input type="text" value="" name="bankname">
       </td>  
     </tr>
     <tr colspan="2">

       <td>
          <b class="label">Amount<b>
       </td>
       <td>
            <input type="text" value="" name="amount1">
       </td>       
     </tr>
 </table>

I want bank name and cheque number label and textbox to be invisible when by cash radio button is clicked.and they should be visible when by cheque radio button is clicked.

I have applied javascript for this as:-

function payment(e) { if (e.value==cash) { document.getElementById(chqno).style.display=block; document.getElementById(bankname).style.display=block; } else { document.getElementById(chqno).style.display=none; document.getElementById(bankname).style.display=none; }

}

please help me with this


Advertisement
View Answers

Related Tutorials/Questions & Answers:
How to hide and show some field on a radio button click
How to hide and show some field on a radio button click  This is my... and cheque number label and textbox to be invisible when by cash radio button is clicked.and they should be visible when by cheque radio button is clicked. I have
Hide/Show paragraph by button click
Hide/Show paragraph by button click In this tutorial, we will discuss about how to hide/show paragraph by clicking on button using jQuery. In the below... displays another button "click to show paragraph " .when we click
Advertisements
Toggle hide/show by clicking same button
Toggle hide/show by clicking same button In this tutorial, we will discuss about how to toggle hide/show by clicking button. In the given below 2 example, there is button ,by clicking on it, the paragraph will hide/show . In first
How to add radio button value in a table for particular field?
How to add radio button value in a table for particular field?  Hi,I... one radio button for text field then it insert only one value absent OR present... dynamically from other table and two radio button one for present and the second
get a radio button click value - JSP-Servlet
get a radio button click value  thanks sir for sending code ,but i...") in servlet that is used in another jsp so can i call getParameter("radio") i.e in the input tag name="radio" eventhough i m getting a null value please help me
Show text by button click using jQuery
Show text by button click using jQuery In this tutorial, we will discuss about hide/show text by clicking on button. In the below example, there are two buttons : hide and show .The "hide " button is used to hide text
Hide/show Image by click
Hide/show Image by click In this tutorial ,we will discuss about how to display image by click using jQuery. In the below example, a image and two lines...; Click here to hide the logo </font> </div> <div id
Dojo Radio Button
button do some action on press.  Try Online: Radio Button The RadioButton class... exactly only one choice from a group of radio button. Click a non-selected radio...Dojo Radio Button         
how to show search results in the same panel of jframe to where search field and button is present..
how to show search results in the same panel of jframe to where search field and button is present..  Hello Sir, Sir i do have one more query... search field and button is present . please Sir, send me the code
How to show next question from database on the click of next button..(Struts & Hibernate)
How to show next question from database on the click of next button..(Struts... 2 tables. Cards and CardTopics. cardtopic(field) is common to both the tables. Problem.: When m clicking my next button it is not showing another question
How to show next question from database on the click of next button..(Struts & Hibernate)
How to show next question from database on the click of next button..(Struts... 2 tables. Cards and CardTopics. cardtopic(field) is common to both the tables. Problem.: When m clicking my next button it is not showing another question
Hide text by clicking button
Hide text by clicking button In this tutorial, we will discuss about hide/show... : hide and show .The "hide " button is used to hide text and "show button " is used to show text. These actions are fired when "
How to Hide Button using Java Swing
How to Hide Button using Java Swing  Hi, I just begin to learn java programming. How to hide the button in Java programming. Please anyone suggest... Programming application how to hide the buttons using Java Swing. Please Visit
how to show search results in the same panel of jframe to where search field and button is present..
how to show search results in the same panel of jframe to where search field and button is present..  Hello Sir, I am working on project where i have to show the search result in the same panel of where search field
Show text field & check input using jQuery
Show text field & check input using jQuery In this tutorial, we will discuss about how to display 'text field' by a button click & check... how to display 'text field' by a button click & check input using
how can i hide and show tables
how can i hide and show tables  hai, i am creating a form which the code is included below i want to hide the tables initially and after i click go... the style attribute, we have made table invisible. But, when the user click Go button
hide show keyboard iphone
hide show keyboard iphone  How to hide show keyboard in iPhone programmatically
hide show keyboard iphone
hide show keyboard iphone  How to hide show keyboard in iPhone programmatically
hide show keyboard iphone
hide show keyboard iphone  How to hide show keyboard in iPhone programmatically
How to call java method on Button click in jsp?
How to call java method on Button click in jsp?  How to call java method on Button click in jsp
Radio button in JSP - JSP-Servlet
Radio button in JSP  Hi! In my page I have two radio buttons. If i select first radio button. one text field has to be displayed.... If i select second radio button. text field has to be disappeared. pls.... help me.. 
radio button
radio button  On selecting a radio button, it should open a aspx page
JavaScript Hide Button
; In this section, you will learn how to hide the button using JavaScript... JavaScript Hide Button... the page you will get the button. On clicking the button, the function hide
Jquery Hide and Show Div
in HTML can be shown or hide on button click method in jQuery. The jQuery show...="mycontentdiv">Click Hide button, to disappear.</div> <...Using jQuery effects one can perform lots of task such as Hide, Show, Toggle
How to use radio button in jsp page
How to use radio button in jsp page       This is detailed java code how to use radio... according to student data then click submit button that will call another jsp page
JSP hide and show tables
JSP hide and show tables In this tutorial, you will learn how to hide and show... which is having a table consists of database data and a Go button. Using the style attribute, we have made table invisible. But, when the user click Go button
how to display default radio button in struts2.0 for first time login - Struts
how to display default radio button in struts2.0 for first time login  hi, this is suresh jampala, i have one question regarding struts2.0,how can i display default radio button in struts2.0 when ever i loggedin first time
insertin form data into databse and blank all form field when click on submit button
database when click on submit button and blank all form field after inserting...insertin form data into databse and blank all form field when click on submit...) Click "Ok" and then try the JSP. form.jsp: <form name="form" method="post
Show Hide Text Javascript - Java Beginners
Show Hide Text Javascript  Please tell me how to show hide text using Java Script
radio button - Development process
but when i click on cr radio button and enter value in text box.it enter the msg but it again go to sr radio button   Hi friend, Plz give full...radio button  hi, there is 2 radio button and five text box
Query on radio button
Query on radio button  I am having a multiple row in jsp page.They are dynamically coming. For each row there is one radio button. I want to select..., the values should got to a ActionClass. My query is that how do i send all
hide and show result in jsp
hide and show result in jsp  what codes do i have to change to make my result display if only i enter the correct value? suppose if i click search,then the result will be display at the bottom.. if not.. only the header
Struts 2 Radio Button
radio buttons and I am using Struts2 tag.I want first rado button to be selected by default.But when i select the second radio button and hit on search button i want to retain the selection of that second radio button on search list
iPhone Radio Button Example
iPhone Radio Button Example  Can you please suggest me how to create Radio button in my iPhone application. Actually, in my application i have two... click on that button it get selected and by default it should display unselected
JavaScript Show Hide table
; In this section, we are going to show and hide table on clicking the button using... JavaScript Show Hide table.... On clicking the button 'Show', the function showTable() is called and the table
on click button php
on click button php  Function in PHP for on click button
radio button - Development process
radio button  hello,i want to creat two radio button.out of which only one can be selected.and can show the contain of selected radio box   Hi friend, Code to solve the problem : My Page Radio 11
how to pass input from radio button to jsp page
how to pass input from radio button to jsp page  hi.. the code below here there are list of radio buttons here in jsp page when the values...; <input name="radiobutton" type="radio" value="radiobutton" />
iphone button click event
iphone button click event  Hi, How to write iphone button click event? Thanks   Hi, Here the method declaration: -(IBAction) myMetod...{ NSLog(@"Button clicked"); } Thanks
validation of radio button
validation of radio button  There are 3 radio button as A,B,W. there are another radio as 1,2,3.if we select W in first radio button then should select 2nd one(1,2,3).if we select A or B not need select any one from 1,2,3
how to pass input from radio button to jsp page
how to pass input from radio button to jsp page  hi.. the code below here there are list of radio buttons here in jsp page when the values...; <input name="radiobutton" type="radio" value="radiobutton" />
how to pass input from radio button to jsp page
how to pass input from radio button to jsp page  hi.. the code below here there are list of radio buttons here in jsp page when the values...; <input name="radiobutton" type="radio" value="radiobutton" />
How to check for Empty textboxed and fill it with a value on a button click
How to check for Empty textboxed and fill it with a value on a button... with a Button beside it . when i enter a text in that box and click the button it should go.... the button should be disabled once i click it(i managed to do that), but when i'm
Radio button Validation
Radio button Validation  Hi.. How to validate radio button in java?if the radio button is not selected an error message should be given... Please...()==false)){ JOptionPane.showMessageDialog(null,"Please select radio button
dependent radio button
of the Radio Button is to select only one option at a time. So you don't need...dependent radio button  Hi. I have 4 radio buttons say all,chocolate... the all option and the already selected options should be deselected. How to do
passing values on button click
passing values on button click  Please help me to solve this issue.I want to pass a value assigned to button to another view upon button click in xcode
pass radio button values to next page
pass radio button values to next page  how to pass selected radio button values which coming from mysql database to next page using php. Please show me with examples
passing value of radio button
passing value of radio button  hi,i have 3 jframe built using the GUi editor in net beans 6.9. i have two radio button in the first jframe.i have... frame.plz help me how can i do so? PLEASE note that all the codes
java radio button and exception
java radio button and exception  Dear Sir/Madam, I have problem with my addBagelRadioButton and addCheeseRadioButton. There should be only 1 radio button can be selected, but somehow 2 can be selected the same time. Also, I
jquery button click
jquery button click  jquery button click - I have created a button in JQuery but the problem is that it's not detecting click. What could... to create a button event in JQuery. You can edit it as per your requirement. In Header
Advertisements
 

 

 

DMCA.com