Click to See Complete Forum and Search --> : Dynamic renaming of files


Frazerjones
07-28-2003, 04:43 AM
I am having a bit of trouble with my web designing and haven't been working with Javascript for very long so my knowledge is quite limited. I am working with Dreamweaver 3.0.

Basically, i have a page split into 2 frames, the top frame and the bottom frame. In the bottom frame there is a list of files that are linked to code files elsewhere on my h drive. I want these, when clicked on, to display the relevant code in the top frame. The problem is that the code files have extensions of .mod, .def, .ddf etc. and when the link is clicked Notepad is opened rather than the code being shown in the top frame.

If i change the file extensions to .txt then at all works perfectly but the only problem there is that there are over 500 files and changing the extension to every single file isn't an option. Also the whole page needs to be maintainable, i.e. if the files were updated but kept the same file name then they would just replace the old files and the links would work.

Can anyone help???:confused:

Moderators Note
Cross postings are considered rude.Please refrain from doing that.
Thanks.

Bungholio
07-31-2003, 11:42 PM
ok well, dunno if youve got an answer, but i can suggest maybe having a temp file created with php

copy the file from its location, to yoursite/temp, then rename to .txt, then open

php.net .. post in the php forum

you could prob do all this with asp too (?)

good luck