Loading an iFrame in HTML

Posted on 2012-03-30
Last Modified: 2012-04-01
Dear Experts,

I have a requirement for my customer to load an Iframe from an external party / vendor in to a small portion of real estate in our website.

 When I tried to use iFrame or loads the same parent page inside the iframe instead of the URL given by my vendor.

It is intriguing and confusing me. Let me know if something else can be done in HTML and Javascript to achieve this functionality.

Question by:SubbuUSA
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
LVL 22

Assisted Solution

by:Kim Walker
Kim Walker earned 250 total points
ID: 37788861
Are you entering the entire url including the "http://"?

Author Comment

ID: 37788882

Yes I am passing my URL  "" through my querystring . Either I give this way or simply "" or Just "". Same result :(
LVL 22

Expert Comment

by:Kim Walker
ID: 37788941
Why would you include your own url in the query string? If the site you're loading wants to know your url, you must leave the "http://" out of the query string. Any part of the url before that http:// will be ignored.
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 37788973

Sorry my english was bad. what I meant was..I am allowing my vendor to pass the URL in to my iframe to load. The URL my vendor passes does contain

I am not passing my URL in to the querystring. sorry my bad if it has confused you.
LVL 22

Expert Comment

by:Kim Walker
ID: 37789012
I missed that part in your initial post. So it sounds like there are three parties.
1. You have a website
2. You have a customer
3. There's an external party/vendor

How is your customer accessing your site to modify the iframe tag to load the external party/vendor page?

Please post the html for your page that includes the iframe that is loading improperly.

Author Comment

ID: 37789132

            <title><tri:BrandText name="ProductName" /></title>
      <iframe width="600" height="600" src=""></ iframe>

Code behind

if (res.QURL != null)
                    var repUrl = new Url("");
                    contentRequest.NamedObjects["QuizURL"] = repUrl;
                    return new InvocationResponse("ShowFrameIn");

LVL 22

Expert Comment

by:Kim Walker
ID: 37789258
Is it the customer's website or your website?

The HTML looks fine and the third party/vendor url is already there. Please explain the code behind. Where does it reside and how does it interact with the website?

Author Comment

ID: 37791153

Thanks for your repsonse. I dont have a website. External party is loading my customer's website. the repUrl in code behind comes from a querystring. sorry about the hardcoding part. invocation reponse is actually loading a content file. It resides in  my customer's solution.we get querystring from a webservice hosted by third party. I hope I answered all your questions.
LVL 21

Accepted Solution

masterpass earned 250 total points
ID: 37794067
First of all, make sure that your customer supports iframe rendering!

Try to modify like this

<iframe src=""></iframe>

see if the w3 schools is getting rendered in your code. If w3 schools is getting rendered then the problem is not with your code and you will have to talk to your customer to allow iframe rendering.

some famous sites which does not allow Iframe rendering are google and hotmail!

Hope this helps!

Author Closing Comment

ID: 37794069

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question