Connecting Tech Pros Worldwide Forums | Help | Site Map

Internal website must link to images on network mapped drives

Newbie
 
Join Date: Nov 2008
Posts: 2
#1: Nov 18 '08
I'm using the latest IE7 and FF3, the standards at my company.

I have two cases...

1. Styles: In my style sheet I have:
body {background-image:url(/z:/internalsite/projects/images/joespic.jpg);}

2. in the body somewhere:
<img src="/z:/internalsite/projects/images/tomspic.bmp" />

Thanks to Firebug's DOM inspection, I was able to get those to work in Firefox.

Here's the problem...that format for locating a file on a mapped drive does not work in IE7. IE7 prefers ALMOST ANYTHING ELSE!!!?????????????????(imagine about a zillion more ? marks)

like:
<img src="file:\\//
<img src="\\\
<img src="///
<img src="file:///z:/

I guess because we are on XP Pro at work, IE7 just ignores all the bogus src locations, but gets the images anyway.

What is the proper way to do this?

TIA

drhowarddrfine's Avatar
Expert
 
Join Date: Sep 2006
Posts: 5,575
#2: Nov 18 '08

re: Internal website must link to images on network mapped drives


The internet is based on Unix so the forward slash is correct everywhere but Windows. On Windows, with file, it should be file:\\z:\filename etc.

EDIT: It's been so long since I've used Windows that way that I'm doubting myself and wonder if it might actually be file://z:\filename etc. Try both
Newbie
 
Join Date: Nov 2008
Posts: 2
#3: Nov 18 '08

re: Internal website must link to images on network mapped drives


The style sheet required:
body {background-image:url(file://z:/.../filename);}

but the <img> tag required:
<img src="file:\\z:\...\filename" / >

Thanks
Reply