SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Nov 2004
    Location
    India
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with dynamic menu

    hey there, i have created a dynamic menus for ie, with the div tag......... it works fine,, but when it comes over the drop down list box.... the part goes below it. i have tried giving z-index, but nothing works fine

    can any body suggest me what to do?

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Portsmouth UK
    Posts
    1,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is a Not so good IE feature

    The example code hides select boxes when 'kbKeyBoard' covers the select box

    PHP Code:

    function kbKBShow(){
     
    kbCC('kbKeyBoard').style.visibility='visible';
     if (!
    document.all){ return; }
     var 
    kbx=document.all['kbKeyBoard'].style.pixelLeft;
     var 
    kby=document.all['kbKeyBoard'].style.pixelTop;
     for (
    kbi=0kbi<kbSelNukbi++) {
      
    kbobj=document.all.tags('select')[kbi];
      if (!
    kbobj||!kbobj.offsetParent)
       continue;
       
    // Find the element's offsetTop and offsetLeft relative to the BODY tag.
       
    kbobjLeft=kbobj.offsetLeft;
       
    kbobjTop=kbobj.offsetTop;
       
    kbobjParent=kbobj.offsetParent;
       while (
    kbobjParent.tagName.toUpperCase()!="BODY"){
        
    kbobjLeft+= kbobjParent.offsetLeft;
        
    kbobjTop+= kbobjParent.offsetTop;
        
    kbobjParent=kbobjParent.offsetParent;
       }
       
    // Adjust the element's offsetTop relative to the dropdown menu
       
    kbobjTop=kbobjTop-kby;
       if (
    kbx>(kbobjLeft+kbobj.offsetWidth)||kbobjLeft>(kbx+document.all['kbKeyBoard'].offsetWidth));
       else if (
    kbobjTop>document.all['kbKeyBoard'].offsetHeight);
       else if ((
    kby+document.all['kbKeyBoard'].offsetHeight)<=10);
       else
        
    kbobj.style.visibility="hidden";
     }
    }

    function 
    kbKBHide(){
     for (
    kbi=0;kbi<kbSelNu;kbi++) {
      
    kbobj=document.all.tags('select')[kbi];
      if (!
    kbobj||!kbobj.offsetParent)
       continue;
       
    kbobj.style.visibility='hidden';
     }
    }

    function 
    kbKBVis(kbVis){
     for (
    kbi=0;kbi<kbSelNu;kbi++) {
      
    kbobj=document.all.tags('select')[kbi];
       
    kbobj.style.visibility=kbVis;
     }

    to see it in action

    http://homepage.ntlworld.com/vwphill...d/KeyBoard.htm

  3. #3
    SitePoint Member
    Join Date
    Nov 2004
    Location
    India
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    thanx

    thanx, actually i did that with the help of ifrmae control

    it worked fine

    thanx a lot for the help


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
  •