In my company’s corporate web site, we have implemented required third party web site contents for reporting which located on other domain websites. These content are secured and need authentication with SSL. To displays these content on our website we had IFRAME.
Our problem starts when that other domain web site has placed new version of their site with rich UI using Ajax and Dojo script. After this new version, our website pages start giving some weird JavaScript messages as Permission is denied in Firefox and Access is denied in IE. We know that there is some problem with other website object and the big issue is we cannot do anything on that other web site part as it is from different merchant with different domain. We people have made conclusion that we need to find out alternative of Iframe, which can run third party content on our website.
After some goggling, we have found some solution which is as below.
For Container (Just like a Iframe container) we have used DIV tag and make it to runat server in our ASPX page.
<div id="ReportContainer" runat="server" />
For source content we have used <Object> tag which will get the dynemic content from other third party secure site. But now we need to display that dynemic contents to our DIV. for that we have used below line of code in code behind file(.cs)
ReportContainer.InnerHtml = "<object type='text/html' style='width: 720px;height: 600px;' data='" + gsURL + "'></object>";
After adding these two line of code we are able to run that third party contents to our site but it is only working with IE. We are still in process to run it with all variety of browsers.
Please share with us if you have any other good alternative of Iframe.
Kind Regards and Happy Coding
No comments:
Post a Comment