Re: external javascript not working



Peter J Ross wrote:
In alt.html on Fri, 12 Sep 2008 20:05:38 +1000, none <""> wrote:

Hi all,

Still pretty new to html. At the risk of showing everyone my private information I have my homepage http://users.tpg.com.au/jennlion/.

You will see that it is pretty much a blank page with only a title. I'm including a small amount of javascript so that I can have a reusable menu on the left hand side, but for some reason when I include the javascript in a separate file and use the src="Navigation.js" attribute, the page breaks as you can see. It works on my development machine for some reason, regardless of browser.

I guess there are two questions here, why is it not working,

As far as I can see, it *is* working. Have you changed something since
posting?

It works on my linux box using Firefox 2.X. This is where I develop it. It doesn't work in IE on XP running in Virtual box, or on a pure XP laptop with either firefox 3 or IE 6.


and what is the best way to have a reusable menu of links down the
left hand side?

Don't use javascript. The menu will disappear for users who have
javascript turned off and navigation around the site will be impossible.

If you don't want to paste the menu into every page, you could use PHP
to include it.

I suggest you fix the various errors in your XHTML first:

<http://validator.w3.org/check?uri=http%3A//users.tpg.com.au/jennlion/Index.html>

Also, in Index.html, both images have the same "alt" attribute.

Thanks, I'll work on your suggested improvements.

Lionel.
.



Relevant Pages

  • external javascript not working
    ... At the risk of showing everyone my private information I have my homepage http://users.tpg.com.au/jennlion/. ... I'm including a small amount of javascript so that I can have a reusable menu on the left hand side, but for some reason when I include the javascript in a separate file and use the src="Navigation.js" attribute, the page breaks as you can see. ... It works on my development machine for some reason, ...
    (alt.html)
  • Re: external javascript not working
    ... including a small amount of javascript so that I can have a reusable ... some reason, regardless of browser. ... It works on my linux box using Firefox 2.X. ...
    (alt.html)
  • Re: Is Java Runtime Environment a risk?
    ... I use Firefox because with the NoScript add-on ... do you know the difference between Java and JavaScript? ... That's the reason I asked. ...
    (alt.comp.anti-virus)
  • Re: Javascript from treeview
    ... Firefox it will show you the Javascript source. ... For some reason IE ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • change background on hover
    ... I'm trying to code this without using javascript, ... but in Firefox for some reason the images start like in the ...
    (comp.infosystems.www.authoring.stylesheets)