Connecting Tech Pros Worldwide Help | Site Map

ugly source code with embedded javascript in html

  #1  
Old July 23rd, 2005, 10:35 PM
ngoc
Guest
 
Posts: n/a
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
  #2  
Old July 23rd, 2005, 10:35 PM
Martin Honnen
Guest
 
Posts: n/a

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 Threads
Thread Thread Starter Forum Replies Last Post
FAQ update and proposed updates Richard Cornford answers 2 November 9th, 2005 06:35 PM