close

Popup window won't close until I click the alert shown on the parent page

So the child popup window won't close until I click the alert button, however, when I use the resize method for the child, it resizes before it shows the alert. Here is the code on the parent page: function ClosePopup(objWindow, strMessage) { objWindow.close(); //objWindow.resizeTo(30, 30); if (strMessage != '') { alert(str...

How to handle socket error during logout routine

I am writing an instant messaging library. Currently, when a SocketException is raised while reading or writing to the socket, I start the logout routine from inside the application, passing the SocketException to the enduser as an argument of the LogoutEventArgs. This gives the end user a way of seeing what underlying exception actually...

Where do I control the behavior of the "X" close button in the upper right of a winform?

I'm venturing into making my VB.NET application a little better to use by making some of the forms modeless. I think I've figured out how to use dlg.Show() and dlg.Hide() instead of calling dlg.ShowDialog(). I have an instance of my modeless dialog in my main application form: Public theModelessDialog As New dlgModeless To fire up t...

Why is my Android app force closing when I try to check if an EditText has a double

Scanner scanner = new Scanner(lapsPerMile_st); if (!scanner.hasNextDouble()) { Context context = getApplicationContext(); String msg = "Please Enter Digits and Decmials Only"; int duration = Toast.LENGTH_LONG; Toast.makeText(context, msg, ...

Javascript function, on web page close

Hello there, I have an problem that i can not solve. The problem is this way: When i close my page on some browser i want an message box to appear and to ask me if I really want to close the page or not. logically: click on x (close tab on web browser) and than the box appears with two buttons yes and now, if i click yes the page wi...

Closing Windows Forms on a Touchscreen

Our clients have fat fingers, and so do we. We take touchscreen netbooks apart to insert them into our custom hardware, and I write a software interface that shows up on the touchscreen. The problem is that it has about a 3/4" bezel over the screen, which means hitting that little red "X" becomes a challenge, especially considering reduc...

jquery: How to completely remove a dialog on close

When an ajax operation fails, I create a new div with the errors and then show it as a dialog. When the dialog is closed I would like to completely destroy and remove the div again. How can I do this? My code looks something like this at the moment: $('<div>We failed</div>') .dialog( { title: 'Error', close: func...

Android Map application forces close when map marker is clicked.

Hi there, I'm building a google map application that marks several points on the map. I'm currently trying to get the dialog box to appear when the marker is clicked. Right now, the markers appear at the right places but when i click them, the entire application stops unexpectedly/forced to close. Does anyone have any suggestions on wha...

Python : How to close a UDP socket while is waiting for data in recv ?

Hello, let's consider this code in python: import socket import threading import sys import select class UDPServer: def __init__(self): self.s=None self.t=None def start(self,port=8888): if not self.s: self.s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM) self.s.bind(("",port))...

How do I abort a socket.recv() from another thread in python?

I have a main thread that waits for connection. It spawns client threads that will echo the response from the client (telnet in this case). But say that I want to close down all sockets and all threads after some time, like after 1 connection. How would I do? If I do clientSocket.close() from the main thread, it won't stop doing the recv...

window.close() generates problem

this code generates problem [encountered problem of window] and close all the safari windows, but this code is working fine with Internet Explorer. What will I do ? have any alternative method for closing current opened window in every browser. <input type='button' value='close' onclick='window.close()'> ...

close other HTML window by javascript function

hello i need a popup window to appear to the user but without parent widow ! but this is impossible so i think that I may have to make the popup close the parent after it appears, but how ? i tried this in the popup: <BODY align="center" valign="center" onload="javascript:window.opener='x';window.close();"> but it closed the pop...

Close current UserControl

I have a Window1.xaml main Window and after same event I display a UserControl EditFile.xaml The code behind is: public static int whichSelected = -1; private void button1_Click(object sender, RoutedEventArgs e) { //searchEditPanel.Children.Clear(); whichSelected = listViewFiles.SelectedIndex; searchEditPanel.Children.Add(_E...

Java BufferedWriter close()

Hi, assume that I have the following code fragment operation1(); bw.close(); operation2(); When I call BufferedReader.close() from my code, I am assuming my JVM makes a system call that ensures that the buffer has been flushed and written to disk. I want to know if close() waits for the system call to complete its operation or does i...

Do function on process close?

Say I have created a process using Process.Start();. How would I tell if it had been closed/terminated, without freezing the application. In CSharp, of course. Thanks! ...

disable javascript popup on refreshing page

Hi all, I have written code like this to throw a pop up when my website is closed. But this throws the pop up even if i refresh my page. Please help me to throw popup only when i close the browser of that website. (disable popup on refreshing page) <body onunload="javascript: exitpop()"> <script type="text/javascript"> function exitpop...

Adding a close button to a jQuery Accordion script

Hey guys, I am wondering if there is a way to add a close button (or action) to this accordion script I'm working on. I have no jquery knowledge, but am eager to learn it. Here is my accordion code: $(document).ready(function(){ $(".accordion .intro:first").addClass("active"); $(".accordion .more:not(:first)").hide(); $(".accordion...

After Changing Some Names, WinForm.Close(); Doesn't Work...

I'm going through a final check of some of my code, and made a few name changes here and there to keep all of the naming conventions consistent. Now I'm running my code, and when I try to close a form using WinForm.Close();, it doesn't close anymore. I changed all of the names corresponding to the WinForm correctly, so I'm confused a...

Disabling Minimize & Maximize On WinForm?

Hello SO and happy Friday, WinForms have those three boxes in the upper right hand corner that minimize, maximize, and close the form. What I want to be able to do is to remove the minimize and maximize, while keeping the close. I also what to make the close minimize the form instead of closing it. How can this be done? ...

Closing inputstreams

I have the below code to read from a URL object: URL url= new URL("http://datasource.com"); BufferedReader reader = new BufferedReader( new InputStreamReader(url.openStream())); After I am done getting the data, is this sufficient to close and release all the resrouces: reader.close(); I did not...