That approach has one known issue... the js file get cached into the client
computer, if you make any update final users would be forced to press CTRL+F5
to avoid loading that file from cache.
A workaround is to add to the js call a querystring with the date and the time
http://blogs.msdn.com/cbeiter/archiv...fice-live.aspx
/// ------------------------------
/// Braulio Diez
///
///
http://www.tipsdotnet.com
/// ------------------------------
"Mel" wrote:
On Nov 28, 2:02 pm, "Mike" <M...@community.nospam.comwrote:
Create a js file. Put your javascript in that file and then just include it
on your pages.
<script type="text/javascript" src="yourjavascriptfile.js"/>
"Mel" <MLights...@gmail.comwrote in message
news:74**********************************@b40g2000 prf.googlegroups.com...
Is there a way to use the same javascript code for 2 pages? For
maintenance reasons, if I make a fix or a change I will need to
remember do it for both pages. Is there any way to get around this?
For example, I have one calculator but when I click a link on one page
it is just displayed as a popup window and on another page it is
displayed as a full page (using master page and content).
(Using Asp.net 2.0, javascript, Visual Basic.net, Win XP Pro)
Thank you, I'll give it a whirl.