Connecting Tech Pros Worldwide Forums | Help | Site Map

calling .js file - will this help?

minchu
Guest
 
Posts: n/a
#1: Jul 23 '05
Hello,
I have created a site using DreamWeaver and I have used some behaviors
(mouseover, showhide layers etc.). Is it better to keep all the
scripts used for mouseover, showhide layers in a .js file and link
it(<script language="JavaScript" type="text/JavaScript"
src="mover.js"></script>)
or is it better to leave it in the header part of each individual HTML
pages.
I was asuming, keeping the script in .js file will reduce size of each
html and also it's good for web crawlers.
Kindly suggest me about this.

script inside the html - http://www.teledna.com/pages/aboutus.html
script called from .js file -
http://www.teledna.com/test/pages/aboutus.html

Regards,
Minchu.

Howard Kaikow
Guest
 
Posts: n/a
#2: Jul 23 '05

re: calling .js file - will this help?


Putting the .js in a file, rather than replicating in numerous HTML pages,
is much better if only for code management.
You would then change the code in only 1 place to have the changes apply to
all the pages referencing the .js.

--
http://www.standards.com/; See Howard Kaikow's web site.
"minchu" <minchu2000@yahoo.com> wrote in message
news:4df28e6f.0410122203.5a204c96@posting.google.c om...[color=blue]
> Hello,
> I have created a site using DreamWeaver and I have used some behaviors
> (mouseover, showhide layers etc.). Is it better to keep all the
> scripts used for mouseover, showhide layers in a .js file and link
> it(<script language="JavaScript" type="text/JavaScript"
> src="mover.js"></script>)
> or is it better to leave it in the header part of each individual HTML
> pages.
> I was asuming, keeping the script in .js file will reduce size of each
> html and also it's good for web crawlers.
> Kindly suggest me about this.
>
> script inside the html - http://www.teledna.com/pages/aboutus.html
> script called from .js file -
> http://www.teledna.com/test/pages/aboutus.html
>
> Regards,
> Minchu.[/color]


Closed Thread