Rank: Advanced Member Groups: Member
Joined: 1/2/2017 Posts: 32
|
Please help,
I'm trying to dynamically create IFRAME objects in a HTML/jQuery page rendered with the EO.WebBrowser, that in turn, was created by using a ResourceHandler. When my page gets called, my ResourceHandler works fine, and it passes down the HTML/jQuery logic fine, which works fine to create the IFRAME, and specify the IFRAME's "src" and then append it to the DOM of the page. All works fine, and in turn, the same ResourceHandler gets called for when the IFRAME gets launched. But, after the ResourceHandler gets done, and the proper HTML is passed down to the output stream, the IFRAME does not render it. The IFRAME only gets the following HTML:
<html><head></head><body marginwidth="0" marginheight="0"></body></html>
This HTML is not mine, which I can easily tell, as I never use the [marginwidth="0" marginheight="0"] notation for anything, let alone the <body>.
When I don't use my ResourceHandler, the IFRAMEs work correctly, and I am easily able to swap out the use of my ResourceHandler, by a simple flag, so I know my HTML.jQuery is fine.
What am I missing?
Does the EO.WebBrowser need somrthing more in the ResourceHandler for IFRAMES to work?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
Hi, Please handle WebView.ConsoleMessage to trace out the JavaScript console messages. Most likely you will get some kind of JavaScript exception. The most likely reason that you get JavaScript exception is due to cross site scripting (XSS) check. As a security measure, by default the browser engine does not allow script from one site to acts on pages loaded from another site. So if your main page is from "http://server1/app1/page1.html" and your iframe src is "http://myspecialhandler/app1", then these are considered two different sites and scripting between them are prohibited. There are two ways to work around this. One way is to make sure the domain portion of your customer resource handler matches the domain of the host page. Another way is to turn XSS check off by setting this property to false: https://www.essentialobjects.com/doc/eo.webengine.browseroptions.enablewebsecurity.aspxYou can find more information on how to set browser options here: https://www.essentialobjects.com/doc/webbrowser/advanced/browser_options.aspxPlease let us know if it works for you. Thanks!
|
Rank: Advanced Member Groups: Member
Joined: 1/2/2017 Posts: 32
|
I have new information on this issue. It was due to another problem, which I resolved, and is documented here: https://www.essentialobjects.com/forum/postsm43768_HOWTO-Make-the-ResourceHandler-run-faster.aspx#43768
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
Thanks for the update!
|