Home > Archive > ASP .NET Webcontrols > March 2007 > WebBrowser question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
WebBrowser question
|
|
|
| Hello,
The url I use for webbrowser has a button thta closes the browser.
How to catch this event ? WebBrowser is notr closing but stay inactive after
closing.
Is it possible to have something like window.showModalDialog(url)?
CS
| |
| Steven Cheng[MSFT] 2007-03-20, 4:28 am |
| Hello CS,
Regarding on the "catch webbrowser close event", do you mean you want to
detect webbrowser closing? If this is the case, I'm afraid so far web page
haven't any direct means to detect webbrowser window's closing. There
exists an "unload" event for <body> html element that can detect the
document(in browser)'s unloading(this will occur when the browser is closed
or the page has been refreshed).
BTW, if you possible, would you provide a public address of that url so
that we can have a look at the exact behavior?
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
========================================
==========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...t/default.aspx.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.
| |
|
| This windows is inside MS CRM, uneasy to provide some url.
In fact the url I call from web browser is normally called from another main
page inside a popup, and it contains an 'Ok' button that closes the popup.
The javascript used is
function showlookup() {
var url;
url =
"http://crm/_controls/lookup/lookupsingle.aspx?class=null&objecttypes=2&browse=0"
var lookupItems = window.showModalDialog(url,"488px,498px");
alert(lookupItems.items[0].id);
}
to simulate this in webbrowser, I put the corresponding url in
webbrowser.url.
So when called inside web browser, pressing the Ok button does nothing but
having the IE explorer warning 'the application is trying to close the
Windows, do youn want to continue' (or something similar in english,
translating from french).
If I accept, the windows is not closed, I would also xpect to get the
result: lookupItems.items[0].id ?
CS
"Steven Cheng[MSFT]" <stcheng@online.microsoft.com> a écrit dans le message
de news: wjbMBaqaHHA.1028@TK2MSFTNGHUB02.phx.gbl...
> Hello CS,
>
> Regarding on the "catch webbrowser close event", do you mean you want to
> detect webbrowser closing? If this is the case, I'm afraid so far web
> page
> haven't any direct means to detect webbrowser window's closing. There
> exists an "unload" event for <body> html element that can detect the
> document(in browser)'s unloading(this will occur when the browser is
> closed
> or the page has been refreshed).
>
> BTW, if you possible, would you provide a public address of that url so
> that we can have a look at the exact behavior?
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
>
> ========================================
==========
>
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscript...ault.aspx#notif
> ications.
>
>
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscript...t/default.aspx.
>
> ========================================
==========
>
>
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
| |
| Steven Cheng[MSFT] 2007-03-21, 5:45 am |
| Thanks for your reply CS,
So for the opened page(show in modal dialog browser windows), that's the
script code you used to close it?
Here is a web thread discussing on registering some script for opening
modaldialog and return result to parent page in ASP.NET:
http://www.eggheadcafe.com/articles/20050319.asp
You can also have a test to see whether it works.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
|
|
|
|
|