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.
Page 1 of 3 123 LastLast
Results 1 to 15 of 36
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    317
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Layer Positioning in IE5 & NS6

    I know there have differrences in IE5 and NS6 in the CSS position:absolute style attribute, So, i create a reposition function for IE5 and Nestcape6, such as:

    if(ns6){
    obj.style.left = 120;
    obj.style.top = 132;
    }

    it work fine, but when i resize the window (in NS6), the position can't go relative to the windows size.

    please help!! In IE, I use mergin-left and margin-top instead of left and top, then only it work the way as I want it to be.

    Please advice. Thanks!

  • #2
    New Coder
    Join Date
    Jun 2002
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts
    u probably need to reload the page everytime the window gets resized. or u could change teh properties of the window so that it can't be resized ( the resizable property) no idea whether this or if it will work or not!
    onResize="handlerText"
    to reload, the handler text would be this:
    javascript:location.reload()
    Hope this information helped u out!
    Computers are simple for the complex mind, yet complex for the simple mind

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    here's a generic, cross browser reload/resize trap, which must be in the BODY section



    Code:
    <script language="javascript">
    
    var agt = navigator.userAgent.toLowerCase();
    
    function nsReload() { window.location.reload(); }
    
    function resizeReload() {
    
    	if (window.opera||(agt.indexOf("konqueror")!=-1)) {
    		var newBW=window.innerWidth;
    		var newBH=window.innerHeight;
    		if(newBW==oldBW&&newBH==oldBH){ setTimeout("resizeReload()",100); }
    		else { window.location.reload(); }
    		}
    
    	else if (document.layers) {
    		if (agt.indexOf("win")!=-1) { setTimeout("window.onresize=nsReload", 500); }
    		else { window.onresize=nsReload; }
    		}
    
    	}
    
    if(window.opera||(agt.indexOf("konqueror")!=-1)){
    	var oldBW=window.innerWidth;
    	var oldBH=window.innerHeight;
    	resizeReload();
    	}
    else if (document.layers) { resizeReload(); }
    else { window.onresize=new Function("window.location.reload()"); }
    
    </script>

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Posts
    317
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Urgent!

    would like to add somemore things, that is when I change the screen resolution, the position "out" of the position as well...
    please advice.

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Posts
    317
    Thanks
    0
    Thanked 0 Times in 0 Posts
    for better understanding of what I want (previous thread), kindly go to
    http://www.setiahomes.com/johor/index2.html and have a look.
    Thanks You Very Much!

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Posts
    317
    Thanks
    0
    Thanked 0 Times in 0 Posts
    continue previous thread.
    after access to the page,
    1.)please mouseover the "futurelaunches" menu (at top banner) and see (in IE 5 and NS6)

    2.) Click on the "property for sales" Link, at side menu, the position display not properly in NS6, after clicking, there have "gap" between Development Progress Link and Futurelaunches.

    Pls advice. Thanks You!!

  • #7
    New Coder
    Join Date
    Jun 2002
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    what do u mean?

    do u mean like u want the menu to be straight under it?
    and i just opened it in netsacpe 6 and the postitioning is fine
    Computers are simple for the complex mind, yet complex for the simple mind

  • #8
    Regular Coder
    Join Date
    Jun 2002
    Posts
    317
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ah ya, forget to ask you to click (show event) and double click (hide event), then you will know what I mean.
    Thanks You Very Very Much!!

  • #9
    New Coder
    Join Date
    Jun 2002
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    The menu doesn't even work!

    your menu doesn't work at all in NS6. To fix this, you must implement The DOM way of hiding and showing elements. You're going to have to put in another thing in your if else statement:

    function showLot(id)
    {
    ns6=(document.getElementById) ? true:false
    ns4=(document.layers)? true:false
    ie4=(document.all)? true:false
    if (ns4)
    { document.layers[id].visibility="show"

    }
    else if (ie4)
    {
    document.all[id].style.visibility="visible"

    } else if (ns6)
    {
    document.getElementById(id).style.visibility="visible";

    }
    }

    To hide it, the visibility property should be "hidden"

    Since i don't actually have access to your server, plus i don't really have the time, i can't test and replace the include by myself.
    Computers are simple for the complex mind, yet complex for the simple mind

  • #10
    Regular Coder
    Join Date
    Jun 2002
    Posts
    317
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't know why, the "property for sales" side Link can't work on NS6 at your side. My one no problem, can hide and show, but just have a gap between the "Development Progress" Link and "Futurelaunches" Link.

    MOreover, the position of the "Futurelaunches" menu (banner there) can't stay on the original position when resize it, I want to fix this problem in NS6, in IE it work fine.

  • #11
    New Coder
    Join Date
    Jun 2002
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    huh?

    in NS6 the menu goes to the right a little,u mean u want to fix that?
    and the links work fine now in my browser, without any gaps or anything. ( compared IE to NS6, couldn't c a difference)
    Computers are simple for the complex mind, yet complex for the simple mind

  • #12
    Regular Coder
    Join Date
    Jun 2002
    Posts
    317
    Thanks
    0
    Thanked 0 Times in 0 Posts
    snakedevil1,

    ya, you are right, the menu goes to the left a little (resize smaller), it won't fix under the "Futurelaunches" menu (banner there) like what IE5.5..

    I use NS6.0, what version are you using?? If it work fine, just forget about it...please help me to solve the above problem.

  • #13
    Regular Coder
    Join Date
    Jun 2002
    Posts
    317
    Thanks
    0
    Thanked 0 Times in 0 Posts
    the problem that i requested to solve is fix the layer under the futiurelaunches link.

  • #14
    New Coder
    Join Date
    Jun 2002
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IM not really getting what your saying...

    Do you mean you want it under the future launches links in the banner?
    Computers are simple for the complex mind, yet complex for the simple mind

  • #15
    New Coder
    Join Date
    Jun 2002
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can't find teh menu code

    I've lookes through your code, but can't seem to find the code for the menu. Is it in an include, or in the index of the page?
    If so, which include is it in?
    Computers are simple for the complex mind, yet complex for the simple mind


  •  
    Page 1 of 3 123 LastLast

    Posting Permissions

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