Results 1 to 2 of 2

Thread: Authoring JavaScript

  1. #1
    Join Date
    Mar 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Authoring JavaScript

    I am using a script to create a "tool-tip" type navigation bar where when the mouse is held over a link, the tool-tip appears with sub-links.

    I need to use my JavaScript on every page, as it also contains information about which sub-links to display for every base link. These sub-links will be updated rather frequently, which means I would have to go and edit each page for every update.

    How do I direct my "onMouseover" to find a JavaScript page on my server so I can update only one page, rather than 20?

    Below is what my current link looks like:

    <a href="/main/events.html" onMouseover="showmenu(event,linkset[1])" onMouseout="delayhidemenu()">events</a>

    Any help would be great! Thanks!

  2. #2
    Join Date
    Dec 2006
    Posts
    47
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Default

    You need to place all your javascript in an external file and get it on your pages(s) by a tag such as this in the head...
    <SCRIPT src="myJavascriptScripts.js"></SCRIPT>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •