• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

hide textbox based on selection

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am facing issues in hide and visibility of text box in jsp. whenever I am selecting a radio button I need to hide one textbox.It's working fine.the problem here is ,after hiding the space occupied by the text box is not removing,does any body know how to do it.Please help me,it's very urgent.
 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you hidding it using javascript or logic in your JSP. Posting the JSP and any relevant javascript would help. Also, the html source that is creating the blank space might help as well.
 
Rajesh murthy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
function hideText(value){
if(value =='GROSS'){
document.getElementById('GrossRatetxt').value = '';
document.getElementById('GrossRatetxt').disabled = false;
document.getElementById('grossDiv').style.visibility = 'visible';
document.getElementById('netDiv').style.visibility = 'hidden';
}
else if(value =='NET'){
document.getElementById('NetRatetxt').value = '';
document.getElementById('NetRatetxt').disabled = false;
document.getElementById('grossDiv').style.visibility = 'hidden';
document.getElementById('netDiv').style.visibility = 'visible';
}
}


div id="grossDiv" align="justify"

html:text property="grossRate"
styleClass="InputTxt10black" size="30" maxlength="10"
styleId="GrossRatetxt"
/html:text /span
/div

html:radio property="grossNetInd" value="GROSS"

styleId="Gross"
html:radio
 
Tom Rispoli
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe try putting each of your input fields in a <div>, then control the display by setting style.display of the div to either inline or none.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic