Close window with JavaScript

J

John H.

Hello

I have some trouble in closing a window, Here is the problem:

I develop a asp.net website use client side valiation

<asp:CustomValidator id="CustomValidator1"
ControlToValidate="Text1"
ClientValidationFunction="BasicSearchValidation"
OnServerValidate="ServerValidation"
Display="Static"
ErrorMessage="Not an even number!"
ForeColor="green"
Font-Name="verdana"
Font-Size="10pt"
runat="server"/>


the validation function (JavaScript) is

BasicSearchValidation(source, arguments)
{
...

w1 = window.open("PopupErrorMsg.htm", "example1", "width=400,
height=300, location=no, menubar=no, status=no, toolbar=no,
scrollbars=no, resizable=no");
...
}

ASP.net will automatically call BasicSearchValidation and open a
window,
but when I click close button on the window, it always prompt a
messagebox to ask me to close it. How can I close the window without
the prompting the messagebox?

Thanks!


John
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,077
Messages
2,570,566
Members
47,202
Latest member
misc.

Latest Threads

Top