Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Putting JavaScript in a class
Message
Information générale
Forum:
Internet
Catégorie:
Javascript
Divers
Thread ID:
00390584
Message ID:
00392081
Vues:
10
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform