WebBrowser question

Discussion in 'ASP .Net Web Controls' started by WT, Mar 19, 2007.

  1. WT

    WT Guest

    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
     
    WT, Mar 19, 2007
    #1
    1. Advertising

  2. 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/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.

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



    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Steven Cheng[MSFT], Mar 20, 2007
    #2
    1. Advertising

  3. WT

    WT Guest

    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]" <> a écrit dans le message
    de news: ...
    > 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/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.
    >
    > ==================================================
    >
    >
    >
    > This posting is provided "AS IS" with no warranties, and confers no
    > rights.
    >
     
    WT, Mar 20, 2007
    #3
  4. 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.
     
    Steven Cheng[MSFT], Mar 21, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Daniel Frede

    ASPNET and Webbrowser control

    Daniel Frede, May 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    4,611
    Ken Cox [Microsoft MVP]
    May 18, 2004
  2. ASP .NET Newbie
    Replies:
    10
    Views:
    14,829
    jojobouy
    Sep 28, 2007
  3. clintonG
    Replies:
    3
    Views:
    599
    Hermit Dave
    Sep 25, 2004
  4. =?Utf-8?B?SnVsaWE=?=
    Replies:
    4
    Views:
    777
    =?Utf-8?B?SnVsaWE=?=
    Nov 7, 2004
  5. =?Utf-8?B?S2VubmV0aCBQ?=

    How to get a PDF opening in a clients webbrowser?

    =?Utf-8?B?S2VubmV0aCBQ?=, Nov 14, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    418
    =?Utf-8?B?S2VubmV0aCBQ?=
    Nov 18, 2004
Loading...

Share This Page