PDA

View Full Version : Link to file if it has been uploaded



jcarr
06-22-2006, 02:44 PM
I would like to create a webpage, which has links to PDF files that are uploaded weekly.

week01.pdf
week02.pdf
..
..
week51.pdf
etc.

I would like the page to either:-

Display all the links (e.g. Week01 - Week51) and if someone picks a link which hasn't got the relative PDF file uploaded, they get a message box stating "Not Uploaded yet" instead of getting "404 The page cannot be found"

or

Not to display the link until the PDF file is present.

I've searched these forums but cannot find anything relevant to this.

Thanks
John

djr33
06-22-2006, 08:44 PM
Umm... change the page?

I don't think that javascript will do it for you here.

You should try php.

But it will be complex.

I guess you could base it off the current date, assuming that it does in fact get uploaded on the right day (or it won't match, etc.)

I take it you're just uploading through ftp.... not that you coded a page (in which case you could use that to add a link to the page, or something)

This is a pretty complex question... not sure what the best solution would be.