My Layers in HTML wont work

Discussion in 'HTML' started by Jerry Manner, Jun 7, 2005.

  1. Jerry Manner

    Jerry Manner Guest

    Hi


    I am having problems with my layers in html


    I have a radio button with 3 choices. When a option is clicked a
    javascript function is called which is making a layer visible.
    Here is my javascript function I have placed after the </head> tag and
    before the <body> tag:


    <SCRIPT LANGUAGE="Javascript">
    function showfield(keuze)
    {
    if (keuze == 'recht')
    {
    recht.visibility="visible";
    industrie.visibility="hidden";
    }
    if (keuze== 'industrie')
    {
    industrie.visibility="visible"­;
    recht.visibility="hidden";
    }
    if (keuze== 'onderwerp')
    {
    recht.visibility="hidden";
    industrie.visibility="hidden";
    }



    }


    </SCRIPT>

    Here is the code of the radio button inside the body tag:
    <form method="POST" action="--WEBBOT-SELF--">
    <p><font face="Arial" size="2">Zoek:
    <input type="radio" value="Onderwerp" name="RadioB1"
    onclick="showlist('onderwerp')­"
    checked>Onderwerp
    <input type="radio" value="Diensten" name="RadioB1"
    onclick="showlist('Diensten')"­>Diensten
    <input type="radio" value="Producten" name="RadioB1"
    onclick="showlist('Producten')­">Producten </font>
    </p>
    </form>


    What did I forget to do to make the hidden/visible property of the div
    tag work??


    Regards
    Jerry Manner, Jun 7, 2005
    #1
    1. Advertising

  2. Jerry Manner

    Mitja Guest

    On Tue, 07 Jun 2005 18:06:17 +0200, Jerry Manner <>
    wrote:

    > ...
    > recht.visibility="visible";
    > ...


    recht.style.visibility = "visible";
    Also, you MUST have a look at getElementById to ensure higher
    cross-browser compatibility.

    > What did I forget to do to make the hidden/visible property of the div
    > tag work??


    Of the div element, not tag ;)
    Mitja, Jun 7, 2005
    #2
    1. Advertising

  3. Jerry Manner

    Mark Parnell Guest

    Mark Parnell, Jun 8, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul M.

    .aspx page wont work!

    Paul M., Aug 2, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    474
    John Knoop
    Aug 2, 2003
  2. Jerry Manner

    My html layers are not working

    Jerry Manner, Jun 7, 2005, in forum: HTML
    Replies:
    0
    Views:
    428
    Jerry Manner
    Jun 7, 2005
  3. Bob

    HTML CSS layers problem

    Bob, Jun 28, 2008, in forum: HTML
    Replies:
    3
    Views:
    443
  4. Terri I.
    Replies:
    0
    Views:
    87
    Terri I.
    Jul 24, 2003
  5. Replies:
    0
    Views:
    167
Loading...

Share This Page