Results 1 to 4 of 4

Thread: more iframe help

  1. #1
    Join Date
    Aug 2010
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default more iframe help

    I Know this has to do with the simple iframe thread, sorry about that
    but i'm trying to use this code from an iframe and it's not working
    HTML Code:
    onclick="window.parent.Appear('myDiv');"
    What it does is makes a div disappear or appear

    here is the javascript code for the appear/disappear command
    HTML Code:
     function Appear(itemID){ 
          // Toggle visibility between hidden and visible 
          if ((document.getElementById(itemID).style.visibility == 'hidden')) 
          { 
            document.getElementById(itemID).style.visibility = 'visible'; 
          } else { 
            document.getElementById(itemID).style.visibility = 'hidden'; 
          } 
      }
    anyone know why it's not working?

  2. #2
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    It does work, I tested it.
    You may have forgotten to put the div with the appropriate id on the main page?
    ===
    Arie.

  3. #3
    Join Date
    Jan 2011
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Are there any problems with using iframe? I like iframes, but am not sure if there are any problems with browsers or anything.

  4. #4
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

Bookmarks

Posting Permissions

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