Links

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Z1P2
    New Member
    • Sep 2007
    • 23

    Links

    Is it possible to link to a link on a web page?

    For example, I have a site that uses lots of iframes, and you actually surf the entire site within an iframe... only problem is I havn't figured out how to link to site and have it start at a different iframe.

    If so, what would that link look like?
  • FullyH3ktik
    New Member
    • Sep 2007
    • 52

    #2
    Originally posted by Z1P2
    Is it possible to link to a link on a web page?

    For example, I have a site that uses lots of iframes, and you actually surf the entire site within an iframe... only problem is I havn't figured out how to link to site and have it start at a different iframe.

    If so, what would that link look like?
    If you are linking to another iframe within the iframe, you just add target="" to the link, like this:
    [HTML]<a href="URL" target="IFrame name">Link</a>[/HTML]

    Comment

    • Z1P2
      New Member
      • Sep 2007
      • 23

      #3
      Thanks for the reply, but that only works if I'm trying to link to it from the main page. The question was meant to be how to link to it from off-site. Sorry, I should have clarified that.

      For example, if I have www.mysitename.com and once I'm on that page, I click a link and it changes one of the iframes on that site... now I also have www.mysitename2.com and I want to put a link on there that links to mysitename.com and have it display the other iframe (the one that you would normally have to click a link on the main page to display) from the beginning. How would I do that?

      Comment

      • FullyH3ktik
        New Member
        • Sep 2007
        • 52

        #4
        Originally posted by Z1P2
        Thanks for the reply, but that only works if I'm trying to link to it from the main page. The question was meant to be how to link to it from off-site. Sorry, I should have clarified that.

        For example, if I have www.mysitename.com and once I'm on that page, I click a link and it changes one of the iframes on that site... now I also have www.mysitename2.com and I want to put a link on there that links to mysitename.com and have it display the other iframe (the one that you would normally have to click a link on the main page to display) from the beginning. How would I do that?
        If you want to do that you would have to edit the code in www.mysitename.com and add an onload event to the body tag, for example:
        [HTML]<body onload="window. iframename.loca tion.href='URL' ">[/HTML]
        because then that way, as soon as the body loads, the iframe's location changes to that specified
        but if you do that, the button in the original page would be useless.

        unless if www.mysitename2.com had a frame or an iframe that you could stretch across the whole page, that way if you add the onload event like before, it would be executing in the code of that page not www.mysitename.com.
        the script could look something like this if you did it that way
        [HTML]<html>
        <head><title> </title></head>
        <body onload="window. iframe1.iframe2 .location.href= 'URL'">
        <iframe src="http://www.mysitename. com" name="iframe1" width="100%" height="100%" frameborder="0" ></iframe>
        </body>
        </html>[/HTML]
        iframe2 is the name of the iframe in the page www.mysitename.com
        URL is the URL of the page you want loaded into iframe2, like this http://www.google.com.au

        Comment

        • Z1P2
          New Member
          • Sep 2007
          • 23

          #5
          Ok, well neither of those really fit my needs... I could work around it by saving a seperate copy of my index page and renaming it, then linking to that and changing the src on the iframe on (for example) index2.htm

          That way I could use index.htm for most of my advertizing links, and index2.htm for those that are specifically supposed to go to that content. The only drawback is that in order to update the site, I'll have to update both pages (or hundreds of pages down the road as I build out more content to link to). Oh well, I don't know any other way to get around it... maybe one day we'll have that capability.

          Comment

          Working...