dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: I cannot get external links to load into an IFRAME but files on my server load fine.

Hybrid View

  1. #1
    Join Date
    Mar 2012
    Location
    Battle Ground, Washington
    Posts
    30

    I cannot get external links to load into an IFRAME but files on my server load fine.

    I have horizontal fly out menu in a left div called nav which has an unordered list of items that are links.

    I want all my nav links to open in a main div on the right side. Since its impossible to load directly into the main div from a nav div,

    I decided to use an IFRAME. Why is the behavior of loading local files ex(local.html) on my server not a problem yet

    when I try to load another site such as http://www.google.com it doesn't load? Do I need some magical code via Javascript or Ajax

    to make that happen. I have set up a simple page here with three links. The third google link does not load. I am a novice with Javascript/Ajax/Jquery.

    http://www.thenwbowlingreview.com/Dy...rameLinks.html

    Thank You

  2. #2
    Join Date
    Mar 2012
    Posts
    1,814
    Have you tried loading any other on line page? As far as I'm aware, Google will not allow you to load in an IFrame.

  3. #3
    Join Date
    Aug 2012
    Location
    Canada
    Posts
    56
    try changing:
    <li><a href="http://www.google.com" target="content"> Google </a></li>
    TO:
    <li><a href="#" onclick="document.getElementById('content').src='http://www.google.com';"> Google </a></li>
    OR:
    <li><a href="#" onclick="document.getElementById('content').location.href='http://www.google.com';"> Google </a></li>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles