Swap Text overflow error

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
smersch
Beginner
Beginner
Posts: 4
Joined: Tue Jan 03, 2006 3:29 am

Swap Text overflow error

Post by smersch »

I copied the swap text code and it isn't working ('Point at me' button): http://departments.oxy.edu/globalaffairs/Temp/template/

When I do a local preview out of Dreamweaver, I get

"Stack overflow at line: 17" shortly followed by "Out of memory at line: 17"

Help would be much appreciated...
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

I'm getting 3 errors on the page.

Code: Select all

Error: ns4 is not defined
Source File: http://departments.oxy.edu/globalaffairs/Temp/template/
Line: 3

    if(ns4)_d.write("<scr"+"ipt language=JavaScript src=js.css/mmenuns4.js><\/scr"+"ipt>");
That means it can't find the mmenuns4.js file.

Code: Select all

Error: syntax error
Source File: http://departments.oxy.edu/globalaffairs/Temp/template/
Line: 26
Source Code:  }

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;-
}
That } at the bottom is somehow wrong.

Code: Select all

Error: syntax error
Source File: http://departments.oxy.edu/globalaffairs/Temp/template/
Line: 125
Source Code:
</span>
<span class="fontmedium">
<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<script	language=JavaScript>
	if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");		
	  else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>"); 
	  </script>
<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>
<script language="javascript">

</span></script>
I think the closing span and script are out of order.

The function is working on the demo site. That function will not work with your menu because you are using RC26 from 2003. That wasn't even the final release of the menu, it was beta. You are hundreds and hundreds of levels down. The menu didn't have the programming to do that function back then.

Ruth
Post Reply