Results 1 to 8 of 8

Thread: anylink Vertical menu positions

  1. #1
    Join Date
    Apr 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default anylink Vertical menu positions

    1) Script Title: Anylink Vertical Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...nkvertical.htm

    3) Describe problem:
    I am trying to use this script on an image with hotspots. I want this script to pop next to the selected hotspot, however, when i test the page locally, the menu appears quite far from the hotspot. is there a variable that can be set as to position the menu where i want it to popup?

    thanks!

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    what do you mean hotspot? you mean like an image map? where certain parts of of the image are "clickable" or some other action happens

  3. #3
    Join Date
    Apr 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yes. That is correct

  4. #4
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    okay you need to use a program that you can create image maps on, like dreamweaver, frontpage, and i am sure there are others, and from there you insert an image into the file then click for an imagemap then put the point where you want and go from there

  5. #5
    Join Date
    Apr 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ive got the maps all layed out, the problem is that this menu doesnt popup where it should. i have the map set that on rollover, the menu popsup....it does, just no where near the mapped point.

    i need to know if there is a variable in the script as to where/how to set the location of the popped menu...

  6. #6
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    can be done thru either javascript
    Code:
    <script type="text/javascript">
    // <![CDATA[
    function winPop(url, xOffset, yOffset) {
     popIt = window.open(url, 'popup', 'location=1, status=1, menu=1, toolbar=1');
     popIt.moveTo(xOffset,yOffset);
    }
    // ]]>
    </script>
    or CSS

    HTML Code:
    <style type="text/css">
    <!--
    selector {
     position: absolute;
     top: 00px;
     left: 00px;
    }
    // -->
    </script>
    only problem with the css version is that you would need to create a class / identity for each of the popup windows, but at the same time its good for active page elements, rather then a new page, which Javascript would be better for I believe

  7. #7
    Join Date
    Apr 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    where do i add the javascript coding?

    wont this code position the menu in a specific spot, and not dynamically depending on where the window scrolled or sized?

  8. #8
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    yes it will set it to a specific spot, but what you can do is add the javascript function to your imagemap

    Code:
    <area href="javascript:winPop(url, xOffset, yOffset)" shape="__" coords="" />
    this isnt tested, but i had a thought about doing it thru css... if you set the position to relative on the popup then put relative top and left coordinates, in theory I think you can get the offsets that you want

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
  •