Welcome Guest Search | Active Topics | Sign In | Register

Convert showModalDialog to run in web browser Options
Rick Morayniss
Posted: Thursday, January 15, 2015 1:56:37 PM
Rank: Advanced Member
Groups: Member

Joined: 12/30/2013
Posts: 68
I am almost finished converting my project from VS web Control (IE) to your web Control (Chrome).

One of the last issues is in a number of my web pages, I have used showModalDialog().
I know this is not supported in Chrome, but when I ran it through your control, I get a message that states to use the "NewWindow Event"
Can I get some more information on this please?
What is this event?
How do I call it?, etc?
eo_support
Posted: Thursday, January 15, 2015 4:44:20 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

You should not rely on the built-in showModalDialog. This function does exist in the current version of EO.WebBrowser but you should not use it. The reason is because the current version of EO.WebBrowser is built with Chrome V33 engine. This is a few version behind the current version (V39). And Google has removed showModalDialog since V37. We are in the process of resyncing our code to the current version, so once that is done, showModalDialog will be gone.

However since EO.WebBrowser allows you to define your own JavaScript function, it is possible for you to implement this function yourself. See here for more details on how to implement JavaScript extension function:

http://www.essentialobjects.com/doc/6/advanced/jsext.aspx

Once you implement a JavaScript extension function (you can give it the same name as built-in function such as showModalDialog), calling that JavaScript function will calls into your .NET side code (for example, a C# event handler). Inside your event handler you can do whatever you want. For example, you can create another Form, inside that Form you can place another WebControl and load another page. You can then display this Form modal. Since everything is in your control, you can implement virtually exactly the same behavior as the built-in showModalDialog. This would be the recommended method to do this.

Hope this helps. Please feel free to let us know if you still have any more questions.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.