Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > WebBrowser question

Reply
Thread Tools

WebBrowser question

 
 
WT
Guest
Posts: n/a
 
      03-19-2007
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


 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      03-20-2007
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/subscripti...ult.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/subscripti...t/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
 
 
 
WT
Guest
Posts: n/a
 
      03-20-2007
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]" <(E-Mail Removed)> a écrit dans le message
de news: http://www.velocityreviews.com/forums/(E-Mail Removed)...
> 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/subscripti...ult.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/subscripti...t/default.aspx.
>
> ==================================================
>
>
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>



 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      03-21-2007
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Urgent: Integrate WebBrowser Control in ASP.NET/VB.NET? ASP .NET Newbie ASP .Net 10 09-28-2007 10:41 AM
page_load sometime execute twice with webbrowser conmtrol post =?Utf-8?B?SnVsaWE=?= ASP .Net 4 11-07-2004 07:29 PM
Who has used the IE WebBrowser Control? clintonG ASP .Net 3 09-25-2004 08:54 PM
Type mismatch using Mozilla ActiveX in place of Microsoft WebBrowser? Noozer Firefox 0 05-19-2004 08:08 AM
ASPNET and Webbrowser control Daniel Frede ASP .Net 1 05-18-2004 01:50 AM



Advertisments