Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Putting JavaScript in a class
Message
General information
Forum:
Internet
Category:
Javascript
Miscellaneous
Thread ID:
00390584
Message ID:
00392081
Views:
12
>Hi Folks,
>
>On of my HTML pages is growing (almost without bound) due to all the client-side javascript checking I do.
>
>What I'd like to do is package all the java up into a class (or whatever) that the user only downloads the first time they visit this page.
>
>1. Is this possible?
>
>2. If so, can someone poiont me in the direction of some references.
>
>Cheers,
>
>Andrew


You can put all your JavaScript code in a page with a JS extension. In your Script tag, you refer to that file like this:
(Note that to display the code, I stripped the Script tag)

script language="JavaScript" src="/library/myjsfunctions.js"> script
Guy Barrette, MCSD
============
Blog http://weblogs.asp.net/guybarrette
Microsoft Regional Director, Montreal, Canada www.microsoft.com/rd
MVP, ASP.NET http://mvp.support.microsoft.com/
President, Montreal Visual Studio User Group www.guvsm.net
INETA Regional Rep for Quebec www.ineta.org
UniversalThread Magazine Columnist (.NET Books Review Column) www.utmag.com
Tech Chair French Track, DevTeach 2004 & 2005 www.devteach.com
Business Architect, Microsoft Team - Nurun Inc www.nurun.com
XBox Live Gamer Tag: Slomo QC CA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform