Results 1 to 4 of 4

Thread: How to load a different page using iframes

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

    Default How to load a different page using iframes

    Hello every one. I have a small problem with iframe.
    A company allowed me to load their website within mine, so I thought I would use iframe. I would like to know if there is a way to automatically load their website in the iframe without having to click on the link.

    I explain. Right now I have a page called services.html. In the body section I have a link to the other company that, when clicked, it loads their website within the iframe, like so:


    HTML Code:
    <body>
    
    <a href="http://www.othercompany.com/" target="iframe">Other Company</a>
    
    <iframe frameborder="0" name="iframe" width="1024" height="100%" scrolling="no"></iframe>
    
    
    </body>
    Instead of having to click on the link to load their page in the iframe, I would like to know if I can have that done automatically, every time I go to my services.html page. I looked around in various forums and I found out about an "onload" option, but, after trying it out, I couldn't get it to work.

    I hope my question was clear enough.
    Thank you in advance for your help.

    Luigi
    Last edited by Snookerman; 04-28-2009 at 11:47 AM. Reason: added [html] tags and “Resolved” prefix

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Give the iframe a src attribute:
    HTML Code:
    <iframe src="http://www.othercompany.com/" frameborder="0" name="iframe" width="1024" height="100%" scrolling="no"></iframe>
    Good luck!

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

    Thumbs up Resolved

    It Worked!
    So simple, and yet I couldn't put my fingers on it.

    Thanks a lot

    Luigi

  4. #4
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    You're welcome Luigi, glad to help you.

    Good luck with the site!

Tags for this Thread

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
  •