File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

show/hide formfields

 
Pradeep
Ranch Hand
Posts: 49
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to show/hide formfields
following functions are correct???

function clickPCSpec()
{
document.forms[0].tag_size.visible = true
document.forms[0].flight_no.visible = false
document.forms[0].gate_value.visible = false

}

function clickECSpec()
{
document.forms[0].tag_size.visible = false
document.forms[0].flight_no.visible = true
document.forms[0].gate_value.visible =true

}
 
P Lavti
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To hide:
document.forms[0].tag_size.style.display = "none";

To show:
document.forms[0].tag_size.style.display = "";

Get more details at HTML DOM Display Property
 
Pradeep
Ranch Hand
Posts: 49
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks...............

I also want to show/hide name associated with formfield.For example

Flight No. textfield) then how to show/hide Flight No. which appear on browser
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The easiest way to show/hide some part of the page (form, field or anything inside) is using CSS.
Put the part you want to show/hide in a div, and change the display-property.

hope it helps.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic