Closed Thread Icon

Topic awaiting preservation: editing text Pages that link to <a href="https://ozoneasylum.com/backlink?for=27356" title="Pages that link to Topic awaiting preservation: editing text" rel="nofollow" >Topic awaiting preservation: editing text\

 
Author Thread
EDDII
Bipolar (III) Inmate

From:
Insane since: May 2004

posted posted 01-20-2006 16:28

ok, what i want to do is edit a piece of text for example:

"downloads.html"

so that it would become

"downloads.htm"

any ideas?

DL-44
Lunatic (VI) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 01-20-2006 18:18

While I can't answer your question, it seems important to provide some info -

where would this text reside? (is it the actual uri, is it in a text file, in an html document, etc...)

In what context would you be changing it?

Why?

Etc...

reisio
Paranoid (IV) Inmate

From: Florida
Insane since: Mar 2005

posted posted 01-20-2006 19:37

The whole idea is silly. What is HTM?

EDDII
Bipolar (III) Inmate

From:
Insane since: May 2004

posted posted 01-21-2006 17:27

well its not really practical just as a sort of techincal exercise
i wanted to make a mod rewrite so that when it comes up downloads.html, for example, that it would show index.htm with a frame in it that would show downloads.htm

Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 01-22-2006 09:41

So, basically you want to make sure that no matter what page they go to on your site, it always loads your frameset with this page they requested *inside* the framset?


Justice 4 Pat Richard

Suho1004
Maniac (V) Mad Librarian

From: Seoul, Korea
Insane since: Apr 2002

posted posted 01-23-2006 01:58

I've seen people use this technique to hide their source. Is that what you're trying to do here? If so, could you explain why? I never understood why people felt it necessary to hide their HTML.

If not, just ignore me.

(I'm also wondering if a mod rewrite question belongs in the DHTML/Javascript forum... server side, maybe? I'm not sure, so I'm not going to move it.)

___________________________
Suho: www.liminality.org | Cell 270 | Sig Rotator | the Fellowship of Sup

Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 01-24-2006 05:56

*scratches his chin*

No, you're right Suho. Server-side is where it should be...


Justice 4 Pat Richard

EDDII
Bipolar (III) Inmate

From:
Insane since: May 2004

posted posted 01-24-2006 19:27

ok, well it looks like i didnt make this clear enuff, i want to do it in javascript, its not mod rewrite i have the problem with, see i have that set it up so that index.htm?downloads.htm gives me the index page with the downloads.htm in the frame, but i want to make it so that downloads.htm would make the same thing come up but of course if the adress is not index.htm?downloads.htm it would not work so my next idea was to fetch the bit that said downloads.html, cut the l off the end and then make a frame with that in

divinechaos
Obsessive-Compulsive (I) Inmate

From:
Insane since: Dec 2001

posted posted 01-24-2006 20:09

You would still have to do it with mod_rewrite, if you want it to work consistently and without catastrophic failure. There is no reason to use Javascript. Sounds like you're not using mod_rewrite properly, because it would be more effective for what you're trying to do instead of this index.htm?downloads.htm work. Handle that with some rudimentary PHP or other server-side language.

First, mod_rewrite should take "http://www.example.com/site/downloads.html" and make it "http://www.example.com/index.php?page=downloads" with regex.

Second, index.php should then use $_GET[page] to set the included file in the frameset. Not that frames still have any place in web design, but there you have it.

Alternatively, you could have mod_rewrite handle the whole thing, if your host doesn't offer any dynamic languages on the server.

As for what ".htm" is, it's a bastardization of ".html" back when DOS file extensions would only support 3 characters.

Cheers,
DC

(Edited by divinechaos on 01-24-2006 20:10)

Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 01-26-2006 06:25

Well, it also begs the question of why you're using frames at all... my knowledge of them may be rusty (since I don't use them at all if I can avoid it) but surely for every page that you want to be loadable as the first page people may go to on your site you need ot have a seperate frameset, and for each page which people can just navigate to within your site then you can just set the target attribute in the anchor tag to the correct fame name and let it load it where you tell it to? There really is no reason to use frames, though... if you're looking to only have to edit one page to make it change across your site then you really should be using the above PHP method, or some other server-side solution like SSI


Justice 4 Pat Richard

« BackwardsOnwards »

Show Forum Drop Down Menu