Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Mar 2004
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Killing hyperlinks from include files

    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.

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    What language you using to include the files? it'll help us out a bit. But I really dont thing you can do this.

  • #3
    New Coder
    Join Date
    Mar 2004
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #4
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    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:

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

    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

  • #5
    New Coder
    Join Date
    Mar 2004
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •