Images from HTML file not opening in Netscape
When I open HTML files that I created in WordPad in Netscape Navigator, the JPEG images within the page do not open, whereas if I open the same page with IE, the page opens fine.
I just downloaded Netscape and if someone can enlighten me, I'd appreciate it.
I have a feeling Netscape cannot access the files off my hard drive, for some reason..
Thanks,
Tony
Brian Farkas posted this at 03:43 — 1st April 2001.
They have: 1,015 posts
Joined: Apr 1999
Are the images in the same folder as the HTML page? Are you calling the image as ? Make sure it's not relative to the site root (e.g. /image.jpg) but rather relative to the document (e.g. image.jpg, or if it is in an images folder "images/image.jpg", not /images/image.jpg")
Let me know if this helps. Good luck!
Brian
Suzanne posted this at 18:16 — 1st April 2001.
She has: 5,507 posts
Joined: Feb 2000
Then it's because you have spaces in your file names.
NEVER put spaces in your file names, and ideally, don't use InnerCapitalization either, because you may run into some server conflicts (Unix is case specific, NT isn't).
Suzanne
TonyMontana posted this at 23:30 — 2nd April 2001.
They have: 218 posts
Joined: Apr 2001
Thanks for your help. I noticed that Netscape wants to read files with the slash written as /, while the files off my hard drive are written as C:\MyDocuments\Images\Javascript.html.
Could this be the cause of the problem? If so, how do I go about changing it?
Thanks,
Tony
TonyMontana posted this at 01:13 — 3rd April 2001.
They have: 218 posts
Joined: Apr 2001
"Are you calling the image as
mairving posted this at 04:23 — 3rd April 2001.
They have: 2,256 posts
Joined: Feb 2001
The slant to the slashes is a Unix vs. Microsoft thing. Files in Unix all use the /. When Microsoft came out with DOS they tried to emulate this except they messed up and used the \ instead.
You will notice that files that you access on the internet are / since it was unix based.
However, if you open a local file in Explorer, the slash is reversed \
Mark Irving
I have a mind like a steel trap; it is rusty and illegal in 47 states
Suzanne posted this at 16:13 — 3rd April 2001.
She has: 5,507 posts
Joined: Feb 2000
Ideally, don't use the full path for the images, instead use relative paths for the images and hyperlinks:
images/javascript.html
Otherwise, yes, Netscape reads it slightly differently, preferring file:///c|MyDocuments/Images/Javascript.html where IE wants to do it like Windows.
Using relative paths will remove this problem if it's a hard drive issue.
Suzanne
TonyMontana posted this at 01:19 — 4th April 2001.
They have: 218 posts
Joined: Apr 2001
Thank you, Suzanne. It's much clearer now, and the pages are opening in Netscape.
TonyMontana
TonyMontana posted this at 02:33 — 4th April 2001.
They have: 218 posts
Joined: Apr 2001
And thanks Brian, your suggestions make sense now, and they were the right ones.
TonyMontana
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.