Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Something I must be missing about Javascript and/or JSP


Message #1 by John Owen <JOWEN@f...> on Tue, 24 Jul 2001 08:49:01 -0500
That's pretty cool. :)

I'm still waiting to get my javascript book, so I think my reference is
outdated.

Defer, however, won't resolve my biggest problem.

Luckily, I hammered out a way to do it. I wasn't sure if I could use jsp
tags such as <%= %> within inline javascript. I gave it a shot, and sure
enough I can.

Thanks for the insight,

John Owen
Federal TransTel
Senior Developer


-----Original Message-----
From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]
Sent: Tuesday, July 24, 2001 9:09 AM
To: javascript
Subject: [javascript] RE: Something I must be missing about Javascript
and /or JSP


You can use the "DEFER" keyword in your script tag in order to defer
execution of inline scripts until the page has loaded.

e.g.

<SCRIPT LANGUAGE="JAVASCRIPT" SRC="1.js" DEFER></SCRIPT>
<SCRIPT LANGUAGE="JAVASCRIPT" SRC="2.js" DEFER></SCRIPT>

once the page has loaded, any inline commands in 1.js will be executed, then
2.js will be executed.

However

<SCRIPT LANGUAGE="JAVASCRIPT" SRC="1.js" DEFER></SCRIPT>
<SCRIPT LANGUAGE="JAVASCRIPT" SRC="2.js"></SCRIPT>

would result in 2.js being executed as the page loads, then 1.js would
execute after the page is loaded.  I'm sure you get the general idea...




  Return to Index