Results 1 to 4 of 4

Thread: frames/iframes offsite

  1. #1
    Join Date
    Apr 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default frames/iframes offsite

    hey guys, sorry for the long post..

    not sure if this could be fixed with html,js or what. dont care either
    whatever code can make this happen would be a great help.

    my issue is like this.. got my site, lets call it example0.html

    From that site i use framesets to link 2 other sites, example1.html
    example2.html.

    example1.html is ment to be just like a return to home button wile example2.html the other, displays the site.

    the idea behind all this is allow ppl to return to the main page wile in kiosk mode in IE and without a keyboard needed

    right now it works like it should except that some offsite links cause the frames to disapear leaving ppl stuck at that site with no way home or to close the browser. and im stumped.

    some way to force links into a frame would fix me up real quick.

    any help at all would be great

    the site looks like this;
    <html>
    <head>
    <META HTTP-EQUIV="Refresh"
    CONTENT="3600; URL="example0.html">
    <title>Drug And Health Facts</title>
    </head>
    <frameset rows="25,*" border="0">
    <frame src="example1.html" scrolling=no marginwidth=0 marginheight=0 onload="var d = frames[0].document;var l = d.links[0];if (d.getElementById &&d.getElementById('logo')) {l = d.getElementById('logo');}l.target='_top';">
    <frame src="example2.html">
    <noframes>
    </frameset>
    </html>

    ive been playing with naming and iframes vs framesets and nothing has changed. PLS HELP ME DYNAMIC DRIVE!! :P

  2. #2
    Join Date
    Apr 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    nobody? well heres the site with the code,

    http://bradshawcomputers.com/health.html

    and the problem can be seen when u go to the 2nd link "street drugs" and click "contact us" on the top right, the bar that was visible for most of that site just is gone.. still trying stuff, any ideas?

  3. #3
    Join Date
    Apr 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Red face Contact us link

    Sir
    As near as I can tell, you're displaying a different site inside your frames and then executing a hyperlink on that site. This link has no reference to your frameset and will open in a new window (or reuse the one you're using). If the other site was using something besides an a tag (like ajax or something) it might stay inside your frameset, but it's explicity creating a new page. Assuming you have no control over that site and have some reason in keeping the other site within your frameset, why not just use the hyperlink they use for the 'contact us' form on a link inside your frameset?

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The reason that link wipes out the frame is that it (as do most if not all links on that page) targets _top (from the page's source code):

    Code:
    <a href="http://www.streetdrugs.org/contact.htm" target="_top" . . .
    This is perhaps sloppy coding on the part of the street drugs site, or more likely a deliberate intent to have their site 'break out of frames', should someone navigate to it inside someone else's frame or iframe.

    The nature of modern browsers as regards this issue is such that there is no way to override it other than fetching the page via server side code and actually editing out the target attributes before serving it to your users. This would require PHP, asp, or some other server side code on your host to be both available and configured to allow this sort of thing, and even then would technically be, and possibly even actually be a violation of the external site's copyright.

    Due to this fact (about the copyright), we are not allowed (forum rules) to advise you further on this matter in these forums.

    Closing Thread.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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