Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:17

New code release killed my popUp via image map


Poster: cubefree
Dated: Saturday July 31 2004 - 20:23:28 BST

New code release killed my popUp via image map.

MOUSE OVER the star's points... you should get text popping up.

Curious if the new parameter, "ignoreCollisions" can help?

Working v5.33: http://cubefree.com/clients/star/dev/star/star.php

New release v5.36 not:
http://site230.webhost4life.com/star/star/star.php

Actual menus (pertinent to this problem): http://cubefree.com/clients/star/dev/menu/popup_points.js

Javascript popUP code:
Code:
<script language="JavaScript">
// set clock variable for star points
Clock_popUpRTC = null
Clock_popUpAP  = null
Clock_popUpAF  = null
Clock_popUpTNS = null
Clock_popUpSL  = null

function delayedPopup(_menu) {
   args   = arguments;
   _delay = 450;
   _newPopup="popup('"+args[0]+"')";

   if(_menu='popUpRTC') { Clock_popUpRTC = setTimeout(_newPopup,_delay) }   
   if(_menu='popUpAP')  { Clock_popUpAP  = setTimeout(_newPopup,_delay) }   
   if(_menu='popUpAF')  { Clock_popUpAF  = setTimeout(_newPopup,_delay) }   
   if(_menu='popUpTNS') { Clock_popUpTNS = setTimeout(_newPopup,_delay) }   
   if(_menu='popUpSL')  { Clock_popUpSL  = setTimeout(_newPopup,_delay) }            
}

function stopPopup(_menu) {
   if(_menu='popUpRTC')  { clearTimeout(Clock_popUpRTC) }
   if(_menu='popUpAP')   { clearTimeout(Clock_popUpAP) }
   if(_menu='popUpAF')   { clearTimeout(Clock_popUpAF) }
   if(_menu='popUpTNS')  { clearTimeout(Clock_popUpTNS) }
   if(_menu='popUpSL')   { clearTimeout(Clock_popUpSL) }            
}
</script>




Code:
  <area shape="poly" coords="115,1,69,62,113,122,155,61" href="#RTC" id="popRTC" name="popRTC"  onMouseOver="delayedPopup('popUpRTC')" onMouseOut="stopPopup('popUpRTC')">
  <area shape="poly" coords="68,62,113,122,43,145,0,85,68,61" href="#AP" onMouseOver="delayedPopup('popUpAP')" onMouseOut="stopPopup('popUpAP')">
  <area shape="poly" coords="157,61,227,85,184,145,113,122,157,62" href="#AF" onMouseOver="delayedPopup('popUpAF')" onMouseOut="stopPopup('popUpAF')">
  <area shape="poly" coords="113,123,112,198,44,220,43,147,111,125" href="#TNS" onMouseOver="delayedPopup('popUpTNS')" onMouseOut="stopPopup('popUpTNS')">
  <area shape="poly" coords="113,122,184,147,185,221,114,197,112,123" href="#SL" onMouseOver="delayedPopup('popUpSL')" onMouseOut="stopPopup('popUpSL')">


Poster: John
Dated: Sunday August 1 2004 - 0:41:25 BST

Seems like it's downloading the info (based on activity in the status bar), just not displaying it.

No help, I know, but JS is out of my realm. Andy will have to take a look.


Poster: cubefree
Dated: Monday August 2 2004 - 21:23:13 BST

V5.37 did NOT make a difference either...

Curious if the new parameter, "ignoreCollisions" can help?

Anyone seen how this is used yet?


Poster: Andy
Dated: Tuesday August 3 2004 - 11:01:05 BST

This is so wierd, your code should never have worked before because your comparison operators were wrong.

Here is the list of JavaScript Comparison Operators for future reference, this is the same as the C programming language:

    == Equals
    != Does not equal> is greater than
    >= is greater than or equal to
    < is less than
    <= is less than or equal to


Once you change your code the popups appear again, here is the code at fault - Note that I've changed the = to == to make it work:



Code:
<SCRIPT language=JavaScript>
// set clock variable for star points
Clock_popUpRTC = null
Clock_popUpAP  = null
Clock_popUpAF  = null
Clock_popUpTNS = null
Clock_popUpSL  = null

function delayedPopup(_menu) {
   args   = arguments;
   _delay = 450;
   _newPopup="popup('"+args[0]+"')";

   if(_menu=='popUpRTC') { Clock_popUpRTC = setTimeout(_newPopup,_delay) }   
   if(_menu=='popUpAP')  { Clock_popUpAP  = setTimeout(_newPopup,_delay) }   
   if(_menu=='popUpAF')  { Clock_popUpAF  = setTimeout(_newPopup,_delay) }   
   if(_menu=='popUpTNS') { Clock_popUpTNS = setTimeout(_newPopup,_delay) }   
   if(_menu=='popUpSL')  { Clock_popUpSL  = setTimeout(_newPopup,_delay) }            
}

function stopPopup(_menu) {
   if(_menu=='popUpRTC')  { clearTimeout(Clock_popUpRTC) }
   if(_menu=='popUpAP')   { clearTimeout(Clock_popUpAP) }
   if(_menu=='popUpAF')   { clearTimeout(Clock_popUpAF) }
   if(_menu=='popUpTNS')  { clearTimeout(Clock_popUpTNS) }
   if(_menu=='popUpSL')   { clearTimeout(Clock_popUpSL) }            
}
</SCRIPT>


Hope this helps
Andy


Poster: cubefree
Dated: Tuesday August 3 2004 - 18:33:57 BST

:roll:

Oh my... major oops... not sure how it worked before either??... that is weird!!

OK, sorry for the distraction!

Back to work on the Tree!

:lol:


Poster: cubefree
Dated: Saturday August 7 2004 - 20:15:57 BST

One issue though I have noticed for Mozilla 1.6, is it does not reinitialize setTimeout() a second time.

So, if you go to: http://www.cubefree.com/clients/star/dev/star/star.php, you can go around the points of the STAR image once and get a popUp menu, but once it's executed it does NOT allow setTimeout to work again.

Weird... maybe this is a memory leak??