Connecting Tech Pros Worldwide Help | Site Map

ugly source code with embedded javascript in html

ngoc
Guest
 
Posts: n/a
#1: Jul 23 '05
Hi
I want to make homepage with javascript for drop down navigation menu.
Looking around some webpages, I see javascript code is embedded in html
code. It is ugly and unmaintainable. Are there any way to make a
navigation menu in a file and link to it like CSS technique? So when I
change something in navigation menu file, any pages is changed.
Thanks
ngoc
Martin Honnen
Guest
 
Posts: n/a
#2: Jul 23 '05

re: ugly source code with embedded javascript in html




ngoc wrote:

[color=blue]
> I want to make homepage with javascript for drop down navigation menu.
> Looking around some webpages, I see javascript code is embedded in html
> code. It is ugly and unmaintainable. Are there any way to make a
> navigation menu in a file and link to it like CSS technique?[/color]

You can certainly put script code into an external JavaScript file and
include it with
<script type="text/javascript" src="file.js"></script>

--

Martin Honnen
http://JavaScript.FAQTs.com/
Closed Thread


Similar JavaScript / Ajax / DHTML bytes