Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2007
    Location
    Japan
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    closing/hiding windows

    I am fairly new to javascripting, and i have run into a problem.
    Lets say i have a table on my page, with a button with a value of X that when clicked calls a function "closetable". I dont care if it gets hidden or closed, i just want to be able to make it dissapear, the closest i can get is making it dissapear and reappear in less than a second using documentGetElementById("tableone").style.visibility="hidden". can anybody tell me either what im doing wrong? or a different, yet correct way to make this table go away when i want it to?
    thanks
    i will attach the file incase anybody wants to see it
    Attached Files Attached Files

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Change your X button's type to type="button" OR
    change onclick as
    Code:
    onclick="closediv(); return false;"
    (You form is getting submitted and which is causing your page to reload again, and behaves just like refresh)
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    matthewpshostak (12-28-2007)


  •  

    Posting Permissions

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