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 4 of 4
  1. #1
    alx
    alx is offline
    New to the CF scene
    Join Date
    Jul 2002
    Location
    Medellin, Colombia
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow dinamically hidding html

    hello,

    how can i hide html on the fly?

    i'm trying to do that as following:

    <script language="JavaScript">
    var hide_html = true
    if(hide_html) document.write('<!--')
    </script>
    <table>
    <tr><td>box a</td></tr>
    </table>
    <script language="JavaScript">if(hide_html) document.write('-->')</script>

    but it doesn't work.

    the problem is escaping comments character,

    thanks in advance

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Are you talking about dynamically expanding and collapsing portions of your page???
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    The Netherlands
    Posts
    217
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <table id="blah">
    <tr><td>box a</td></tr>
    </table>

    <script>
    var x=document.getElementById("blah");
    x.style.visibility="hidden";
    </script>

    or:

    <script>
    var x=document.getElementById("blah");
    x.style.display="none";
    </script>

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Mumbai, India
    Posts
    218
    Thanks
    0
    Thanked 0 Times in 0 Posts
    For NS4, you will have to use layers..

    <script>
    document.layerName.document.write('');
    document.layerName.document.close();
    </script>

    <layer id="layerName">........</layer>


  •  

    Posting Permissions

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