SubbuUSA
asked on
Loading an iFrame in HTML
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 frameset..it 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.
Thanks
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 frameset..it 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.
Thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@xmediaman
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 http://www.auto.com
I am not passing my URL in to the querystring. sorry my bad if it has confused you.
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 http://www.auto.com
I am not passing my URL in to the querystring. sorry my bad if it has confused you.
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.
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.
ASKER
HTML
<html>
<head>
<title><tri:BrandText name="ProductName" /></title>
</head>
<iframe width="600" height="600" src="http://www.thirdparty.com"></ iframe>
</html>
Code behind
if (res.QURL != null)
{
var repUrl = new Url("http://www.thirdparty.com");
contentRequest.NamedObject s["QuizURL "] = repUrl;
return new InvocationResponse("ShowFr ameIn");
}
<html>
<head>
<title><tri:BrandText name="ProductName" /></title>
</head>
<iframe width="600" height="600" src="http://www.thirdparty.com"></ iframe>
</html>
Code behind
if (res.QURL != null)
{
var repUrl = new Url("http://www.thirdparty.com");
contentRequest.NamedObject
return new InvocationResponse("ShowFr
}
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?
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?
ASKER
@xmediaman
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
ASKER
Yes I am passing my URL "http://www.anything.com/" through my querystring . Either I give this way or simply "www.anything.com/" or Just "anything.com/". Same result :(