473,698 Members | 2,192 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Closing an Embedded Browser

I have an embedded browser in which the user does some stuff (PayPal payment
actually). When done, I redirect to a page that contains the following
JavaScript

<tr vAlign="top">
<td>&nbsp;</td>
<td<a href="javascrip t: self.close ()">Close this Window</a></td>
<td>&nbsp;</td>
</tr>

When someone clicks the link, it closes my entire application! That is, it
closes the Windows Forms Application in which this WebBrowser control is
embedded. Is there a better way to do this so my application does not exit
as well?

Thanx in advance,
--
Anil Gupte
k.e.e.n
www.keeninc.net
www.icinema.com
www.wizo.tv.
Pune, India
+91-20/65216198
Milwaukee, WI
+1-414/431-8775
Jun 27 '08 #1
2 1153
On May 30, 11:45 am, "Anil Gupe/keen inc." <anil-l...@icinema.co m>
wrote:
I have an embedded browser in which the user does some stuff (PayPal payment
actually). When done, I redirect to a page that contains the following
JavaScript

<tr vAlign="top">
<td>&nbsp;</td>
<td<a href="javascrip t: self.close ()">Close this Window</a></td>
<td>&nbsp;</td>
</tr>

When someone clicks the link, it closes my entire application! That is, it
closes the Windows Forms Application in which this WebBrowser control is
embedded. Is there a better way to do this so my application does not exit
as well?

Thanx in advance,
--
Anil Gupte
k.e.e.nwww.keen inc.netwww.icin ema.comwww.wizo .tv.
Pune, India
+91-20/65216198
Milwaukee, WI
+1-414/431-8775
Anil,
I tried to put the line in a plain html file:
<a href="javascrip t: self.close()">C lose this Window</a>

And called this page from a webbrowser control which is embedded in a
winform, but after "close" confirmation it doesn't close the
application, it HANGS the application, the form's display is distorted
like a not responding application.

Thanks,

Onur Güzel
Jun 27 '08 #2
That is interesting - I don't get a hang and I cannot duplicate that either.

--
Anil Gupte
k.e.e.n
www.keeninc.net
www.icinema.com
www.wizo.tv.
Pune, India
+91-20/65216198
Milwaukee, WI
+1-414/431-8775
"kimiraikko nen" <ki************ *@gmail.comwrot e in message
news:a3******** *************** ***********@27g 2000hsf.googleg roups.com...
On May 30, 11:45 am, "Anil Gupe/keen inc." <anil-l...@icinema.co m>
wrote:
I have an embedded browser in which the user does some stuff (PayPal
payment
actually). When done, I redirect to a page that contains the following
JavaScript

<tr vAlign="top">
<td>&nbsp;</td>
<td<a href="javascrip t: self.close ()">Close this Window</a></td>
<td>&nbsp;</td>
</tr>

When someone clicks the link, it closes my entire application! That is,
it
closes the Windows Forms Application in which this WebBrowser control is
embedded. Is there a better way to do this so my application does not
exit
as well?

Thanx in advance,
--
Anil Gupte
k.e.e.nwww.keen inc.netwww.icin ema.comwww.wizo .tv.
Pune, India
+91-20/65216198
Milwaukee, WI
+1-414/431-8775
Anil,
I tried to put the line in a plain html file:
<a href="javascrip t: self.close()">C lose this Window</a>

And called this page from a webbrowser control which is embedded in a
winform, but after "close" confirmation it doesn't close the
application, it HANGS the application, the form's display is distorted
like a not responding application.

Thanks,

Onur Güzel
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1438
by: Edward Diener | last post by:
I am creating a component and I want one of my properties to be an embedded class with its own properties. When the component designer shows this property I want it to be able to expand this property in-line to enable the end-user to set its values. While my component is derived from System::ComponentModel::Component, my embedded class has to be derived from something else in order for it to be shown as an embedded class but be...
3
2031
by: Daniel | last post by:
Is there a way to make a javascript do something when the user closes the browser? I would like it to go another url or something. I do not want this script to run when a user clicks on a link on the page, only when they close the browser. Thanks in advance.
2
8878
by: Derek | last post by:
Hello: I want to capture the event when a browser is closing, to give to the user the posibility of close or no this browser. When the browser is closing, this show a confirm window with two buttons: Accept and Cancel. When press the Accept button, the browser is closing, and when press the Cancel button, the browser isn´t closing. I have tried with the event onunload, but this closes first the browser, and
4
2883
by: Randy | last post by:
Hi, ok, I found a way to connect to a running instance of an (external) Internet Explorer and access - for example - the html source. That works fine! But now I have running application with an embedded IE webBrowser Control. Is there a possibility for my application to access the webBrowser control in the other application, too? Thanks in advance, Randy
0
1572
by: Anne | last post by:
hie there, i have a couple of questions that i need help on. the first is regarding the closing of a browser.i have an exit button which on click i would like it to totally close the browser, and not only closing the form itself.how can i write the coding for it? Me.Close() doesn't work in this case as it only closes the current application. my 2nd question is abt crystal report viewer. how can i make the viewer appear in the browser...
1
2249
by: Chirag Malvi | last post by:
hello all, I am developing the web application using ASP.net and VS.2003 IDE. here is the situation which i want to implement. 1) User is browsing some webform. I want to trap this event. this i am doing with Session_Onstart. 2) Now when user is exiting i.e. closing the browser window i want to trap this event and perform some operation. I tried using Session_OnEnd event,but
3
2637
by: Jason Chu | last post by:
I've written a file uploading part of my application using the IHttpModule. So now, I don't have the memory problem of uploading something big. Problem: I can't find which function I have to override, so that I can catch the event when while user's uploading a file, then suddenly closes the browser. In that case, couple things happens: 1) ASPNET will start eating up the uploading file on memory instead of on disk (so picture a...
1
10559
by: karthik juneni | last post by:
Hi all, Iam trying to capture windows closing event (i.e) when the user clicks on the "X" button i want to capture that event and want to update some values in the database.I tried two methods but iam getting problems with the two methods. First,one i tried with function Unload()
1
3490
by: pvogel | last post by:
Hi Folks, I've got an asynchronous pluggable protocol (APP) handler implemented (based on the excellent work here: http://www.codeproject.com/aspnet/AspxProtocol.asp) that works absolutely perfectly from a normal IE window. HOWEVER, when accessed from a browser embedded in another application, it doesn't seem to work at all. I can turn on a fair amount of logging and when I access the URL from a normal IE window I see all the logs I would...
0
8674
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9026
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4366
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3045
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.