W
wylbur37
I normally use Mozilla 1.4 on Windows XP Pro.
As I was developing some test webpages, I discovered that the SRC
parameter doesn't seem to work when a path is used with the filename.
In one example, when I want to run a JavaScript from an external file
(i.e., not inline), I would do the following ...
<SCRIPT LANGUAGE="JavaScript" SRC="program.js"> </SCRIPT>
If "program.js" were in a different subdirectory than the .htm file
referring to it, the filename would have to be prefixed by the
pathname as follows ...
<SCRIPT LANGUAGE="JavaScript" SRC="/mydir/program.js"> </SCRIPT>
But when I ran the above from within an .htm file loaded locally into
Mozilla, it did not work. (The result was as if the above code weren't
there). However, when I ran the identical code on Internet Explorer
(v.6), it worked.
In another, even simpler example, the code to put an image on a
webpage is ...
<img src="picture.jpg">
Again, if "picture.jpg were in a different subdirectory than the .htm
file referring to it, the filename would have to be prefixed by the
pathname as follows ...
<img src="/mydir/picture.jpg">
When I ran the above from within an .htm file loaded locally into
Mozilla, it did not work. (The result was as if the above code weren't
there). However, when I ran the identical code on Internet Explorer
(v.6), it worked.
By the way, I tried using backslashes instead of forward slashes. In
both cases, it still worked on Internet Explorer but not on Mozilla.
The SRC parameter seems like a fairly frequently used parameter for
the developers of Mozilla to overlook it. Is this really a bug in
Mozilla or is it just some option/switch in Mozilla that I didn't set
properly?
As I was developing some test webpages, I discovered that the SRC
parameter doesn't seem to work when a path is used with the filename.
In one example, when I want to run a JavaScript from an external file
(i.e., not inline), I would do the following ...
<SCRIPT LANGUAGE="JavaScript" SRC="program.js"> </SCRIPT>
If "program.js" were in a different subdirectory than the .htm file
referring to it, the filename would have to be prefixed by the
pathname as follows ...
<SCRIPT LANGUAGE="JavaScript" SRC="/mydir/program.js"> </SCRIPT>
But when I ran the above from within an .htm file loaded locally into
Mozilla, it did not work. (The result was as if the above code weren't
there). However, when I ran the identical code on Internet Explorer
(v.6), it worked.
In another, even simpler example, the code to put an image on a
webpage is ...
<img src="picture.jpg">
Again, if "picture.jpg were in a different subdirectory than the .htm
file referring to it, the filename would have to be prefixed by the
pathname as follows ...
<img src="/mydir/picture.jpg">
When I ran the above from within an .htm file loaded locally into
Mozilla, it did not work. (The result was as if the above code weren't
there). However, when I ran the identical code on Internet Explorer
(v.6), it worked.
By the way, I tried using backslashes instead of forward slashes. In
both cases, it still worked on Internet Explorer but not on Mozilla.
The SRC parameter seems like a fairly frequently used parameter for
the developers of Mozilla to overlook it. Is this really a bug in
Mozilla or is it just some option/switch in Mozilla that I didn't set
properly?