HighDots Forums  

Absolute file names for links

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss Absolute file names for links in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dave
 
Posts: n/a

Default Absolute file names for links - 02-28-2008 , 04:28 PM






As long as I keep graphic files in a folder below the HTML the
graphics are found, but the actual location of the graphics are on a
different disk. Tried all manner of things, but can't get the
graphics to load, so would appreciate some help.

Test setup is:
D:\Programs\Editor\WebProject\HTML // The code
..\WebProject\HTML\Graphics // Graphics

The actual location of the graphics is:
F:\Documents\ArtWork

What I need to do is get the absolute link to the file correct, so I
need some help here. Funny thing is that if the absolute link is a
web address it works just fine, but not a Windows file.

I agree that placing the graphics either under the HTLM folder or on
the same level is a better idea, but that won't happen until all of
the art is approved, which won't happen until the demo web page is
done. See the problem?

Thanks,
Dave


--
e-mail: d boland 9 (all 1 word) at fastmail period fm

Reply With Quote
  #2  
Old   
David E. Ross
 
Posts: n/a

Default Re: Absolute file names for links - 02-28-2008 , 10:28 PM






On 2/28/2008 2:28 PM, Dave wrote:
Quote:
As long as I keep graphic files in a folder below the HTML the
graphics are found, but the actual location of the graphics are on a
different disk. Tried all manner of things, but can't get the
graphics to load, so would appreciate some help.

Test setup is:
D:\Programs\Editor\WebProject\HTML // The code
..\WebProject\HTML\Graphics // Graphics

The actual location of the graphics is:
F:\Documents\ArtWork

What I need to do is get the absolute link to the file correct, so I
need some help here. Funny thing is that if the absolute link is a
web address it works just fine, but not a Windows file.

I agree that placing the graphics either under the HTLM folder or on
the same level is a better idea, but that won't happen until all of
the art is approved, which won't happen until the demo web page is
done. See the problem?

Thanks,
Dave


In general, browsers cannot interpret Windows shortcuts. If the
graphics are in [F:\Documents\ArtWork], then that's the path you must
use, not [D:\Programs\Editor\WebProject\HTML\Graphics].

--
David Ross
<http://www.rossde.com/>

Have you been using Netscape and now feel abandoned by AOL?
Then use SeaMonkey. Go to <http://www.seamonkey-project.org/>.


Reply With Quote
  #3  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Absolute file names for links - 02-29-2008 , 08:32 AM



Dave wrote:
Quote:
As long as I keep graphic files in a folder below the HTML the graphics
are found, but the actual location of the graphics are on a different
disk. Tried all manner of things, but can't get the graphics to load,
so would appreciate some help.

Test setup is:
D:\Programs\Editor\WebProject\HTML // The code
..\WebProject\HTML\Graphics // Graphics

The actual location of the graphics is:
F:\Documents\ArtWork

What I need to do is get the absolute link to the file correct, so I
need some help here. Funny thing is that if the absolute link is a web
address it works just fine, but not a Windows file.

I agree that placing the graphics either under the HTLM folder or on the
same level is a better idea, but that won't happen until all of the art
is approved, which won't happen until the demo web page is done. See
the problem?

With a *nix system you could use a symbolic link:

/var/www/sites/example.com/imagefolder -> /somewhere/entirely/different

and then later remove "imagefolder" link and replace as folder
"imagefolder" and move all images from "/somewhere/entirely/different"
into it. AFAIK you cannot do this with Windows. So you have 2 options.

1) Use absolute links in the html that will later have to be changed.
BTW don't use Windows-centric path nomenclature but rather:

"file:///F:/Documents/ArtWork/someimage.jpg" that later you will change
to: "Graphics/someimage.jpg"

2) Make copies of images in "F:\Documents\ArtWork" to
"D:\Programs\Editor\WebProject\HTML\Graphics" and just keep folders
synchronized and then just use the relative paths in your html
"Graphics/someimage.jpg" and you won't have to change anything to publish.

3) A third possibility that just occurred to me is to dig up an old
system and slap Linux & Apache on it which would give you the
flexibility that I first mentioned, (symbolic links can point to NFS
mounted folders)... and your development server would more closely
emulate the majority of web servers that a live on the web.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #4  
Old   
Jim Moe
 
Posts: n/a

Default Re: Absolute file names for links - 02-29-2008 , 03:14 PM



On 02/28/08 03:28 pm, Dave wrote:
Quote:
I agree that placing the graphics either under the HTLM folder or on
the same level is a better idea, but that won't happen until all of
the art is approved, which won't happen until the demo web page is
done. See the problem?

As Jonathan Little observed, why don't you have a local web server to
test your code? Using local filesystem paths in an HTML document only
means you have additional maintenance problems and opportunities for error.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)


Reply With Quote
  #5  
Old   
Steve Swift
 
Posts: n/a

Default Re: Absolute file names for links - 03-01-2008 , 02:34 AM



Jim Moe wrote:
Quote:
As Jonathan Little observed, why don't you have a local web server to
test your code? Using local filesystem paths in an HTML document only
means you have additional maintenance problems and opportunities for error.
I couldn't agree more. It takes only a few minutes to install the
Apache webserver.

There are some things that you cannot test using local files. One
example is the JavaScript used to manipulate the date of the document
itself (for a primitive example see: http://www.swiftys.org.uk/ ). When
fetched as a local file, the document.Lastmodified returns nothing useful.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk


Reply With Quote
  #6  
Old   
Ed Mullen
 
Posts: n/a

Default Re: Absolute file names for links - 03-01-2008 , 10:13 AM



Steve Swift wrote:
Quote:
Jim Moe wrote:
As Jonathan Little observed, why don't you have a local web server to
test your code? Using local filesystem paths in an HTML document only
means you have additional maintenance problems and opportunities for
error.

I couldn't agree more. It takes only a few minutes to install the
Apache webserver.

There are some things that you cannot test using local files. One
example is the JavaScript used to manipulate the date of the document
itself (for a primitive example see: http://www.swiftys.org.uk/ ). When
fetched as a local file, the document.Lastmodified returns nothing useful.

Doing it with PHP works on a local Apache (I'm using WAMP) installation.

<?php
$last_modified = filemtime("index.php");
print(" Updated as of: ");
print(date("F j, Y - h:i A", $last_modified));
?>

I use this on some pages of my site.

--
Ed Mullen
http://edmullen.net
The average woman would rather have beauty than brains because the
average man can see better than he can think.


Reply With Quote
  #7  
Old   
Dr J R Stockton
 
Posts: n/a

Default Re: Absolute file names for links - 03-01-2008 , 03:46 PM



In comp.infosystems.www.authoring.html message <47ca623b$1 (AT) news (DOT) greennet
..net>, Sat, 1 Mar 2008 08:34:06, Steve Swift <Steve.J.Swift (AT) gmail (DOT) com>
posted:

Quote:
There are some things that you cannot test using local files. One
example is the JavaScript used to manipulate the date of the document
itself (for a primitive example see: http://www.swiftys.org.uk/ ). When
fetched as a local file, the document.Lastmodified returns nothing
useful.
I don't see that problem.

If you need to support browsers without getFullYear (which IIRC was
available in MS IE 4 in 1998), year = 2000 + D.getYear()%100 should
serve our time, unless you are surprisingly young.

If you were to use array literals, Initialize and +1 could be omitted.

Where the time is given to the minute, would it not be well to indicate
what sort of time it is? IIRC, it's GMT; but older browsers may not put
GMT in .lastModified, in which case it should be appended.

I don't think "Odd ball" should be two words.

It's a good idea to read the newsgroup c.l.j and its FAQ. See below.

--
(c) John Stockton, nr London UK. ?@merlyn.demon.co.uk IE6 IE7 FF2 Op9 Sf3
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.