Results 1 to 6 of 6

Thread: Hiding html objects

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769

    Hiding html objects

    Hi,

    How can I hide things like a button? I want to hide a button when it is clicked.

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Code:
    <input type="button" value="Click Me" onClick="this.style.visibility='hidden'"/>
    That should do it.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    Do you have a link that has a reference to all the html objects and their properties methods and events.

  4. #4
    Member Vincent Puglia's Avatar
    Join Date
    Feb 2002
    Location
    where the World once stood
    Posts
    36
    Hi shunt,

    The solution crptcblade gave you will work only for IE browsers. If you want a crossBrowser solution, you need to place the objects in a div/layer and then toggle that element's visibility. If you want a crossBrowser link, see the "dHTML: an Introduction" script/tutorial at my site.

    Vinny

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    Thanks,

    How what does div do?

  6. #6
    Member Vincent Puglia's Avatar
    Join Date
    Feb 2002
    Location
    where the World once stood
    Posts
    36
    Hi shunt,

    Did you read the introductory script/tutorial at my site? A div/layer in an object that most new browsers allow you to use to hide/display/change elements on a page.

    Vinny

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width