View Full Version : anylink Vertical menu positions

04-30-2007, 04:54 PM
1) Script Title: Anylink Vertical Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/anylinkvertical.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?


04-30-2007, 05:08 PM
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

04-30-2007, 05:22 PM
Yes. That is correct

04-30-2007, 05:26 PM
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

04-30-2007, 05:30 PM
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...

04-30-2007, 05:47 PM
can be done thru either javascript

<script type="text/javascript">
// <![CDATA[
function winPop(url, xOffset, yOffset) {
popIt = window.open(url, 'popup', 'location=1, status=1, menu=1, toolbar=1');
// ]]>

or CSS

<style type="text/css">
selector {
position: absolute;
top: 00px;
left: 00px;
// -->

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

04-30-2007, 05:53 PM
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?

04-30-2007, 06:04 PM
yes it will set it to a specific spot, but what you can do is add the javascript function to your imagemap

<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