Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. PopUp menu closes itself because of Map Area

PopUp menu closes itself because of Map Area

Scheduled Pinned Locked Moved Web Development
htmlcomhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RachelSo
    wrote on last edited by
    #1

    I have a menu on a webpage that I'm starting to develop. When the user hovers over certain menu items it pops up a horizontal menu/image. The popup is an image split via Map Area tags. The reason being is if the user clicks on the top of the image they get redirected to one link, if they click the bottom of the image they go to a different link. My problem occurs when the user is in the popup menu and moves the cursor from Map area to Map area. The popup menu disapears when you go inbetween them :confused: I have the meta code up and running if someone wants to take a look at it here[^] I commented the code so its easier to understand. Heres a breakdown of the flow of code: Someone hovers over the image:

    <tr> <td><a href="#" onMouseOver="display_menu(this,'menuLocations',-40,210,'menuMenu',0)"><img src="images/TabLocations.jpg" alt="Locations" name="Locations" width="235" height="42" border="0"></a></td> </tr>

    Which calls this JScript Sub upon onMouseOver. The Sub displays a popup image

    function display_menu(parent,named,xOffset,yOffset,HideMe,HideMe2)
    { //(parent==Parent Element to popup near
    //named==the named div class popup to displyay.
    //xOffset & yOffset == pixel offset so the menu dosent popup ontop of the parent menu.
    //HideMe & HideMe2 == close this menu-----Used to close the other popup menus when mouse is going from parent menu to parent menu

    //get the named menu
    var menu\_element = document.getElementById(named);
    //override the 'display:none;' style attribute
    menu\_element.style.display = "";
    //get the placement of the element that invoked the menu...
    var placement = findPos(parent);
    //...and put the menu there
    menu\_element.style.top = (placement\[1\] + xOffset ) +"px";
    menu\_element.style.left = (placement\[0\] + yOffset) +"px";
    

    Above JScript displays this Div popup:

    <div class="popup" id="menuLocations" style="display:none;">
    <table width="161" height="68" border="0" align="left" cellpadding="0" cellspacing="0" id="Table_300">
    <tr><td><a href="#" onMouseOut="hide_menu('menuLocations')"><IMG SRC="images/TabKuCalMap.jpg" ALT="" BORDER=0 WIDTH=161 HEIGHT=68 USEMAP="#mapHome"></a></td></tr>
    </table>
    </div>

    Which is split via this

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups