Results 1 to 2 of 2

Thread: Frameset: invoke "preferred" target frame

  1. #1
    Join Date
    Jan 2006
    Location
    up here in my tree
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Frameset: invoke "preferred" target frame

    hello. this is kind of difficult to describe concisely, so i apologize! i just gave you specific example to make it easier for me. thanks.

    i want to create a link from a "retail music instrument store" web site to the web site of one of their product lines-- but in addition to that, i want the target URL to be a frame which itself doesn't have it's own "anchor" or absolute URL that i'm aware of-- because it would normally be reached only by going to the "artists" frame (bottom of first group of links of nav frame)-- as the "main" frame, after the frameset is initially loaded w/ its splash-page of course-- and only then clicking the nav which pulls the sub-page into the frameset. i realize of course that i can link directly to that frame, but i want the frameset to be loaded w/ that page-- as if the user had gone throught the process of clicking through to that sub-page.

    is this possible to do w/ javascript (or another scripting, client-side or server side) that anyone is aware of? it's something i've wished to do on several occasions, but never could think how to do it. now that i've been studying scripting, i realize that it may be possible to create that type of a "link".

    thanks!

  2. #2
    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

    Done entirely with javascript this is illegal across domains. However, due to a quirk in both IE6 and FF1.5.0.1 (the two most popular browsers) and perhaps others (not Opera8.51) this works:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    #hide {
    visibility:hidden;
    }
    </style>
    </head>
    <body>
    <a href="http://www.glguitars.com/featured%20artists/inxs/inxs.asp" target="main" onmousedown="document.getElementById('hide').style.visibility='visible'">link</a><br>
    <iframe id="hide" name="gl" src="http://www.glguitars.com/frameset.htm" width="400" height="300" scrolling="auto" frameborder="0"></iframe>
    </body>
    </html>
    Last edited by jscheuer1; 02-13-2006 at 09:06 AM.
    - 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
  •