New code release killed my popUp via image map

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
cubefree
Super Advanced
Super Advanced
Posts: 82
Joined: Fri Aug 01, 2003 3:16 am
Location: Seattle, WA
Contact:

New code release killed my popUp via image map

Post by cubefree »

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/me ... _points.js

Javascript popUP code:

Code: Select all

<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: Select all

  <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')">
Last edited by cubefree on Sun Aug 01, 2004 4:55 pm, edited 2 times in total.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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.
John
User avatar
cubefree
Super Advanced
Super Advanced
Posts: 82
Joined: Fri Aug 01, 2003 3:16 am
Location: Seattle, WA
Contact:

Post by cubefree »

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

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

Anyone seen how this is used yet?
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

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: Select all

<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
User avatar
cubefree
Super Advanced
Super Advanced
Posts: 82
Joined: Fri Aug 01, 2003 3:16 am
Location: Seattle, WA
Contact:

Post by cubefree »

: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:
User avatar
cubefree
Super Advanced
Super Advanced
Posts: 82
Joined: Fri Aug 01, 2003 3:16 am
Location: Seattle, WA
Contact:

Post by cubefree »

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??
Post Reply