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
Login         

View Questions and Answers by Category

Advertisements


 
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 11 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
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
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 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
Show Hide Text Javascript - Java Beginners
Show Hide Text Javascript  Please tell me how to show hide text using Java Script
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
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
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
Advertisements
 

 

 

DMCA.com