View Full Version : Undefined *.js refernce => NEED HELP

02-27-2003, 09:24 AM
Hi All,
I'm new to JavaScript and need help pse. I have several scripts defining *.js files from where I run a navigation menu, declared in the HEAD section. When code executes it accesses other code, also *.js files but not declared in the head. I furthermore have other SCRIPTS in the head not related to the menu. When I do the window.onload to run all scripts the debugger tells me that some code is not defined. How do I define this code? The undefined code referred to is the 'other' files accessed by the menu operation.

02-27-2003, 09:34 AM
<script language="javascript" src="sniffer.js"></script>
<script language="javascript1.2" src="custom.js"></script>
<script language="javascript1.2" src="style.js"></script>
//Title Animation
var titletext=""
var thetext=""
var started=false
var step=0
var times=1
function welcometext()
if (times==0)
if (started==false)
started = true;
document.title = titletext;
thetext = titletext;
function showstatustext(txt)
thetext = txt;
function anim()
if (step==7) {step=1}
if (step==1) {document.title='>==='+thetext+'===<'}
if (step==2) {document.title='=>=='+thetext+'==<='}
if (step==3) {document.title='>=>='+thetext+'=<=<'}
if (step==4) {document.title='=>=>'+thetext+'<=<='}
if (step==5) {document.title='==>='+thetext+'=<=='}
if (step==6) {document.title='===>'+thetext+'<==='}
if (document.title)

When I execute it tells me that menu_ie5 is not defined. What now? Thanks a lot.

02-27-2003, 09:46 AM
Try takin' one of those onloads out at the bottom...See it?

I'm a bit rusty and if that doesn't work, try:

window.onload=welcometext();menu_ie5.loadFunction();menu_ie4.loadFunction(); :D

02-27-2003, 09:58 AM
The 2 onloads is not the problem. The page loads and works correctly but in the status bar left bottom corner where it says done is a error sign telling me that menu_ie5 is not defined.
I don't know how to define menu_ie5 in the script section where I call the onload=....

02-28-2003, 03:25 AM
where did you define menu_ie5? can you post the code?