Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.js file not loading on initial page hit

Status
Not open for further replies.

Waraq

Programmer
May 8, 2001
26
US
I am using a .js file to initialize variables, links and status bar text for a page. When the page is initially hit, the .js file appears not to be loading as the status bar is reading "undefined" and the links are dead. When I do a reload on the page, the variables, links, etc. get set correctly as the "undefined" is no longer there and they work. Any idead why this is happening? Also I am using Netscape 4.x +

Thanks in advance for any assistance.
 
could you please send some code ? there's not enough information in your question for me to help you efficiently :(
 
The code goes something like this:

<script language=&quot;JavaScript&quot; src=&quot;../act_hotlinenav.js&quot;></script>
<script language=&quot;JavaScript&quot; src=&quot;../act_menulist.js&quot;></script>
<script language=&quot;javaScript&quot; src=&quot;../act_list.js&quot;></script>
<script language=&quot;JavaScript&quot; src=&quot;../act_dynlayer.js&quot;></script>
<script language=&quot;JavaScript&quot; src=&quot;../act_hotlinenavedit.js&quot;></script>
<script language=&quot;JavaScript&quot;>
document.write(mymenu.div)
</script>
</head>

act_hotlinenav.js --> contains the variables with the values to be used when menu is built
act_menulist.js --> contains the code to build a menu object
act_list.js --> contains the code to build a list object
act_dynlayer.js --> contains the code to build a layer object
act_hotlinenavedit.js --> contains the code to build the navigation using all of the above .js files

The mymenu.div is returning &quot;undefined&quot;

If I add the following line above all of the .js file calls, it works fine:
<script language=&quot;Javascript&quot;>
var junk = &quot;this is to kick off the other scripts&quot;
</script>

Thanks in advance for your help.

Waraq

 
!! this is weird !! i've never noticed that ... i'll try to get as much info as i can to help you, but i'm afraid i won't find a lot ... netscape behaves sometimes in a really weird way !! try to go to devedge to see if they have some info ??
 
I actually never noticed it before either, that is why I figured I would post it. Thanks for the assist and I will also check devedge in the meantime.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top