View Full Version : Killing hyperlinks from include files

03-08-2004, 03:20 PM
Ok...here goes.

Quite simply I need to be able to break hyperlinks from include files that are to be loaded into a frame.

The complicated bit - The pages that are going into the frame are retieved from the web (absolute links) therefore I cannot edit any of the pages. These pages have their own header and nav bar which I need to leave out. I am able to retrieve just the include file, which is pure text, into the frame. So everything seems hunky dorky.

Not quite

The include file that I have loaded into the frame from the external site contains hyperlinks. When clicked, they load the new page into the frame with it's header, nav bar etc , which is what I'm am trying to avoid. The result is that I have a whole site loaded into 1 small frame when all I need is the text include within the page.

Please please please someone tell me there is a way to disable these hyperlinks within the include file.

03-09-2004, 03:29 AM
What language you using to include the files? it'll help us out a bit. But I really dont thing you can do this.

03-09-2004, 09:20 AM
The includes are writen in html I believe. Not quite sure if this is possible either but I had to check with you all. If there is no solution I ill have to set to work getting the whole external site replicated onto my server so that I can 'cherrypick' its content.

03-09-2004, 03:34 PM
This is a completely random shot in the dark, but have you considered chucking the includes into some client-side script? I haven't thought it through at all, but something like:

var strContent="<!--#include file="stuff.htm"-->"

Then you could run your replace / split functions on it and cut it down to the bits you want. I dunno. Might work. Probably won't. Sorry :)

03-09-2004, 04:21 PM
yeah I thought about that. Store the html in a variable, modify it and rewrite the html to a file without hyperlinks etc. If only I had more experience I may be able to do it.:(