Share on Google+Share on Google+

Nilima Avinash Raut
How to hide and show some field on a radio button click
0 Answer(s)      5 years and 4 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

Ads

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
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
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
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
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
Tutorials   
Java Spring Hibernate Struts Training code for programming How can I dynamically load user-entered data as content of jquery dialog? java webcam integration question java coding Fix Scrollbar position in a checkboxList after postback Information Save Alert Country wise redirection to files Interface in javascript connect database with javascript Zip Code ZipCode how to validate the email login How to play FLV video files on Ipad using HTML code or javascript code? Nitobi Grid is not working in IE10/IE11 jquery issue plese help RegEx Tree structure from json whose parents can be dragged and dropped from child newyorklife insurance getElementById not working javascript code for search in html file Implement The Skeleton Code Implement This Skeleton Code Mobile Automation using Appium Computer forensic application Java: Searching a string from doc files java linked list urgent !!! java linked list urgent!!! library management library management library management library management question Html form using JavaScript to display the table content java how to prevent no from unroundin off on clicking text box again in JSP and Jquery graph generation from xml design file display data from database in textbox when id entered in textbox Javascript Code for all fields how to get HTTP GET request value using javascript array Javascript Querry autocomplete(): Spring mvc with jquery: I am not getting correct value in the text filed. Please help me Create SpreadSheet same as excel using java applet Create SpreadSheet same as excel using java applet How to change focus among multiple select boxes? Write JQUERY Code Write JQUERY Code Converting jsp variable to java variable java

Ads

 
Advertisement null

Ads