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

Thread: layer problem

  1. #1
    New Coder
    Join Date
    Aug 2009
    Posts
    84
    Thanks
    10
    Thanked 0 Times in 0 Posts

    layer problem

    Hi have a look at this Code:

    <HTML>
    <HEAD>
    <hta:application
    contextmenu="no"
    MAXIMIZEBUTTON="no"
    WINDOWSTATE="maximize"
    >
    <script language="JavaScript">
    function show(){
    if (document.getElementById("menu2").style.visibility = "hidden")
    {
    document.getElementById("menu2").style.visibility = "visible";
    document.getElementById("menu4").style.visibility = "visible";
    document.getElementById("bank2").style.visibility = "hidden";
    document.getElementById("queery").style.visibility = "hidden";
    document.getElementById("bank3").style.visibility = "hidden";
    document.getElementById("queery3").style.visibility = "hidden";
    document.getElementById("queery4").style.visibility = "hidden";
    document.getElementById("search").style.visibility = "hidden";
    }
    document.getElementById("menu").style.background = "#CCCCCC";
    }

    function hide(){
    document.getElementById("menu2").style.visibility = "hidden";
    document.getElementById("menu3").style.visibility = "hidden";
    document.getElementById("menu4").style.visibility = "hidden";
    document.getElementById("queery").style.visibility = "hidden";
    document.getElementById("bank2").style.visibility = "hidden";
    document.getElementById("filebank").style.visibility = "hidden";
    document.getElementById("bank3").style.visibility = "hidden";
    document.getElementById("queery3").style.visibility = "hidden";
    document.getElementById("queery4").style.visibility = "hidden";
    document.getElementById("search").style.visibility = "hidden";
    }

    function show2(){
    document.getElementById("menu3").style.visibility = "visible";
    }

    function show3(){
    document.getElementById("queery").style.visibility = "visible";
    document.getElementById("bank2").style.visibility = "visible";
    document.getElementById("menu2").style.visibility = "hidden";
    document.getElementById("menu4").style.visibility = "hidden";
    document.getElementById("menu3").style.visibility = "hidden";
    document.getElementById("filebank").style.visibility = "hidden";
    document.getElementById("bank3").style.visibility = "hidden";
    document.getElementById("queery3").style.visibility = "hidden";
    document.getElementById("queery4").style.visibility = "hidden";
    document.getElementById("search").style.visibility = "hidden";
    }

    function show4(){
    document.getElementById("bank3").style.visibility = "visible";
    document.getElementById("queery3").style.visibility = "visible";
    document.getElementById("menu2").style.visibility = "hidden";
    document.getElementById("menu3").style.visibility = "hidden";
    document.getElementById("menu4").style.visibility = "hidden";
    document.getElementById("bank2").style.visibility = "hidden";
    document.getElementById("filebank").style.visibility = "hidden";
    document.getElementById("queery").style.visibility = "hidden";
    document.getElementById("queery4").style.visibility = "hidden";
    document.getElementById("search").style.visibility = "hidden";
    }

    function show5(){
    document.getElementById("bank3").style.visibility = "hidden";
    document.getElementById("queery3").style.visibility = "hidden";
    document.getElementById("menu2").style.visibility = "hidden";
    document.getElementById("menu3").style.visibility = "hidden";
    document.getElementById("menu4").style.visibility = "hidden";
    document.getElementById("bank2").style.visibility = "hidden";
    document.getElementById("filebank").style.visibility = "hidden";
    document.getElementById("queery").style.visibility = "hidden";
    document.getElementById("queery4").style.visibility = "visible";
    document.getElementById("search").style.visibility = "visible";
    }

    function shighlight(){
    document.getElementById("menu").style.background = "#6699FF";
    }

    function shighlight2(){
    document.getElementById("menu2").style.background = "#6699FF";
    document.getElementById("menu3").style.visibility = "visible";
    document.getElementById("filebank").style.visibility = "visible";
    }

    function shighlight3(){
    document.getElementById("menu4").style.background = "#6699FF";
    document.getElementById("menu3").style.visibility = "hidden";
    document.getElementById("filebank").style.visibility = "hidden";
    }

    function shighlight4(){
    document.getElementById("menu3").style.background = "#6699FF";
    }

    function shighlight5(){
    document.getElementById("modify").style.background = "#6699FF";
    }

    function shighlight6(){
    document.getElementById("queery").style.background = "#6699FF";
    }

    function shighlight7(){
    document.getElementById("bank2").style.background = "#6699FF";
    }

    function shighlight8(){
    document.getElementById("filebank").style.background = "#6699FF";
    }

    function shighlight9(){
    document.getElementById("remove").style.background = "#6699FF";
    }

    function shighlight10(){
    document.getElementById("bank3").style.background = "#6699FF";
    }

    function shighlight11(){
    document.getElementById("queery3").style.background = "#6699FF";
    }

    function shighlight12(){
    document.getElementById("tools").style.background = "#6699FF";
    }

    function shighlight13(){
    document.getElementById("queery4").style.background = "#6699FF";
    }

    function shighlight14(){
    document.getElementById("search").style.background = "#6699FF";
    }

    function hhighlight(){
    document.getElementById("menu").style.background = "#CCCCCC";
    }

    function hhighlight2(){
    document.getElementById("menu2").style.background = "#999999";
    }

    function hhighlight3(){
    document.getElementById("menu4").style.background = "#999999";
    }

    function hhighlight4(){
    document.getElementById("menu3").style.background = "#999999";
    }

    function hhighlight5(){
    document.getElementById("modify").style.background = "#CCCCCC";
    }

    function hhighlight6(){
    document.getElementById("queery").style.background = "#999999";
    }

    function hhighlight7(){
    document.getElementById("bank2").style.background = "#999999";
    }

    function hhighlight8(){
    document.getElementById("filebank").style.background = "#999999";
    }

    function hhighlight9(){
    document.getElementById("remove").style.background = "#CCCCCC";
    }

    function hhighlight10(){
    document.getElementById("bank3").style.background = "#999999";
    }

    function hhighlight11(){
    document.getElementById("queery3").style.background = "#999999";
    }

    function hhighlight12(){
    document.getElementById("tools").style.background = "#CCCCCC";
    }

    function hhighlight13(){
    document.getElementById("queery4").style.background = "#999999";
    }

    function hhighlight14(){
    document.getElementById("search").style.background = "#999999";
    }

    function createfbank(){
    document.getElementById("nfb").style.visibility = "visible";
    document.getElementById("filebank").style.visibility = "hidden";
    document.getElementById("menu2").style.visibility = "hidden";
    document.getElementById("menu3").style.visibility = "hidden";
    document.getElementById("menu4").style.visibility = "hidden";
    }

    function delnfb(){
    document.getElementById("nfb").style.visibility = "hidden";
    }

    function nfbvb(){
    document.getElementById("nfb").style.visibility = "hidden";
    newfb();
    }
    </script>

    <script language="VBscript">
    Sub newfb()
    alert(nme.value)
    alert(nob.value)
    End Sub
    </script>


    <style type="text/css">
    #background {position:absolute; left:0;top:0; z-Index:-1;height="1500";width="1500";background-color="#CCCCCC"}
    #menu {position:relative; left:-5;top:1; z-Index:1;font-family:arial; font-size:18px; color:black; visibility:visible;cursor:hand;background-color:#CCCCCC;height:24;width:40;}
    #menu2 {position:relative; left:3;top:1; z-Index:1;font-family:arial; font-size:18px; color:black; visibility:hidden;background-color:#999999;height:30;width:90;border-style:solid;border-width:1px;height:24;width:81;cursor:hand}
    #menu4 {position:relative; left:3;top:1; z-Index:1;font-family:arial; font-size:18px; color:black; visibility:hidden;background-color:#999999;height:30;width:90;border-style:solid;border-width:1px;height="24";width:81;cursor:hand}
    #menu3 {position:relative; left:85;top:-47; z-Index:1;font-family:arial; font-size:18px; color:black; visibility:hidden;background-color:#999999;height:30;width:90;border-style:solid;border-width:1px;height="24";width:81;cursor:hand}
    #modify {position:relative; left:36;top:-95; z-Index:1;font-family:arial; font-size:18px; color:black; visibility:visible;cursor:hand;background-color:#CCCCCC;height:24;width:66;}
    #queery {position:relative; left:42;top:-95; z-Index:1;font-family:arial; font-size:18px; color:black; visibility:hidden;background-color:#999999;height:30;width:90;border-style:solid;border-width:1px;height="24";width:81;cursor:hand}
    #queery2 {position:relative; left:42;top:-95; z-Index:1;font-family:arial; font-size:18px; color:black; visibility:hidden;background-color:#999999;height:30;width:90;border-style:solid;border-width:1px;height="24";width:81;cursor:hand}
    #queery3 {position:relative; left:115;top:-341; z-Index:1;font-family:arial; font-size:18px; color:black; visibility:hidden;background-color:#999999;height:30;width:90;border-style:solid;border-width:1px;height="24";width:81;cursor:hand}
    #queery4 {position:relative; left:196;top:-413; z-Index:1;font-family:arial; font-size:18px; color:black; visibility:hidden;background-color:#999999;height:30;width:90;border-style:solid;border-width:1px;height="24";width:81;cursor:hand}
    #nfb {background-color:#CCCCCC;height:150;width:300;border-styleutset;border-width:5px;font-size:15px;position:relative;top;30;left;30;visibility:hidden;z-index:-5;}
    #bank2 {position:relative;left:42;top:-246;z-Index:1;font-family:arial; font-size:18px; color:black; visibility:hidden;background-color:#999999;height:30;width:90;border-style:solid;border-width:1px;height="24";width:81;cursor:hand}
    #bank3 {position:relative;left:115;top:-341;z-Index:1;font-family:arial; font-size:18px; color:black; visibility:hidden;background-color:#999999;height:30;width:90;border-style:solid;border-width:1px;height="24";width:81;cursor:hand}
    #filebank {position:relative;left:85;top:-269; z-Index:1;font-family:arial; font-size:18px; color:black; visibility:hidden;background-color:#999999;height:30;width:90;border-style:solid;border-width:1px;height="24";width:81;cursor:hand}
    #remove {position:relative; left:105;top:-341; z-Index:1;font-family:arial; font-size:18px; color:black; visibility:visible;cursor:hand;background-color:#CCCCCC;height:24;width:76;}
    #tools {position:relative; left:184;top:-412; z-Index:0;font-family:arial; font-size:18px; color:black; visibility:visible;cursor:hand;background-color:#CCCCCC;height:24;width:54;}
    #search {position:relative; left:196;top:-413; z-Index:1;font-family:arial; font-size:18px; color:black; visibility:hidden;background-color:#999999;height:30;width:90;border-style:solid;border-width:1px;height="24";width:81;cursor:hand}
    #workspace {postition:relative;background-color:white;height:4000;width:800;font-size:15px;font-color:black;z-index:5;border-style:solid;border-width:1px;left:0;top:0;}

    </style>
    </HEAD>
    <BODY bgcolor="#CCCCCC">
    <div ID="menu" onclick="show()" onmouseover="shighlight()" onmouseout="hhighlight()">
    <center>File</center>
    </div>
    <div ID="menu2" onmouseover="shighlight2()" onmouseout="hhighlight2()">
    New&#160;&#160;&#160;&#160;&#160;&rarr;
    </div>
    <div ID="menu4" onmouseover="shighlight3()" onmouseout="hhighlight3()">
    Open
    </div>
    <div ID="background" onclick="hide()">
    </div>
    <div ID="menu3" onmouseover="shighlight4()" onmouseout="hhighlight4()">
    Bank
    </div>
    <div ID="modify" onmouseover="shighlight5()" onmouseout="hhighlight5()" onclick="show3()">
    <center>Modify</center>
    </div>
    <div ID="queery" onmouseover="shighlight6()" onmouseout="hhighlight6()">
    Queery
    </div>
    <div ID="nfb">
    <br>
    &nbsp;Name:&nbsp;<input type="text" name="nme" value="">
    <br>
    <input type="checkbox" name="swbanks">&nbsp;Start with banks
    <br>
    &nbsp;Number:&nbsp;<input type="text" name="nob" value="">
    <br>
    <br>
    &nbsp;&nbsp;&nbsp;<input type="button" value="Cancel" name="cancel" onclick="delnfb()"> &nbsp;<input type="button" value="Create" name="create" onclick="nfbvb()">
    </div>
    <div ID="bank2" onmouseover="shighlight7()" onmouseout="hhighlight7()">
    Bank
    </div>
    <div ID="filebank" onmouseover="shighlight8()" onmouseout="hhighlight8()" onclick="createfbank()">
    Filebank
    </div>
    <div ID="remove" onmouseover="shighlight9()" onmouseout="hhighlight9()" onclick="show4()">
    <center>Remove</center>
    </div>
    <div ID="bank3" onmouseover="shighlight10()" onmouseout="hhighlight10()">
    Bank
    </div>
    <div ID="queery3" onmouseover="shighlight11()" onmouseout="hhighlight11()">
    Queery
    </div>
    <div ID="tools" onmouseover="shighlight12()" onmouseout="hhighlight12()" onclick="show5()">
    <center>Tools</center>
    </div>
    <div ID="queery4" onmouseover="shighlight13()" onmouseout="hhighlight13()">
    Queery&rarr;
    </div>
    <div ID="Search" onmouseover="shighlight14()" onmouseout="hhighlight14()">
    Search&rarr;
    </div>
    <div ID="workspace">
    <table border="1">
    <tr>
    <th>File Name</th>
    <th>Location</th>
    <th>Size</th>
    <th>Type</th>
    </tr>
    <tr>
    <td>test</td>
    <td>desktop</td>
    <td>65KB</td>
    <td>.txt</td>
    </tr>
    <tr>
    <td>big</td>
    <td>desktop</td>
    <td>90KB</td>
    <td>.jpg</td>
    </tr>
    </table>
    </div>

    </BODY>
    </HTML>

    Now if you run it you will see that the big white box with the table in it is quite low down. well it shouldn't be. its position is absolute with 0 left and top values.
    ive located the problem nfb layer i think but im not sure. even then i just don't know what to do. The nfb layer is not in use at the moment but i will need it later.

    Thanks

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Please follow http://www.codingforums.com/showthread.php?t=82672. You may edit your above post.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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