...

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



kimosabi
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.

kimosabi
02-27-2003, 09:34 AM
<head>
<title></title>
<script language="javascript" src="sniffer.js"></script>
<script language="javascript1.2" src="custom.js"></script>
<script language="javascript1.2" src="style.js"></script>
<script>
//Title Animation
var titletext=""
var thetext=""
var started=false
var step=0
var times=1
function welcometext()
{
times--
if (times==0)
{
if (started==false)
{
started = true;
document.title = titletext;
setTimeout("anim()",1);
}
thetext = titletext;
}
}
function showstatustext(txt)
{
thetext = txt;
setTimeout("welcometext()",4000)
times++
}
function anim()
{
step++
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+'<==='}
setTimeout("anim()",200);
}
if (document.title)
window.onload=onload=welcometext;menu_ie5.loadFunction;menu_ie4.loadFunction;
</script>
</head>

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

zoobie
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

kimosabi
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=....

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum