SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    back again: Moving Layers (the Wilco Thread)

    moving on from getting the cell position

    Code:
    <script language="javascript">
    <!--
    var agt=navigator.userAgent.toLowerCase();
       var is_gecko = (agt.indexOf('gecko') != -1);
       var keep_menu = false;
    
    function show_clan_links(ob,clanid)
    {
    		var layer = document.getElementById('clanlinks');
    		layer.offsetLeft = 
    		ob.offsetLeft;
    		
    		var title_table = document.getElementById('title_table');	
    		layer.offsetTop = ob.offsetTop + title_table.height + ob.height;
    		layer.visible = true;
    		//alert(ob.offsetLeft);
    }
    # -->
    </script>
    <div id="clanlinks" style="position:absolute; left:55px; top:109px; width:215px; height:222px; z-index:1; overflow: visible;"></div>


    <td class="clan_links" onMouseOver="this.className='clan_links_mover';show_clan_links(this,'1');" onMouseOut="this.className='clan_links';">



    error on "layer.offsetLeft = " This object does not support this property or action. when the MSDN page says it does.



    ** also how do I set the visibility of a Div tag?
    Last edited by Wilco; Oct 7, 2002 at 11:47.

  2. #2
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    okay, offsetLeft is readonly, finally found that out :|


    dont forget, how i set visibility?

  3. #3
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    layer.style.visibility = true;

    Note: In IE, depending on how the style is set in your HTML and/or CSS, you may need currentStyle instead

    layer.currentStyle.visibility = true;
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev





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
  •