Ask a Question related to ASP.NET General, Design and Development.
-
John H. #1
Close window with JavaScript
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
John H. Guest
-
Close Window JavaScript CS3
Does anyone know how to close a pop-up window in Dreamweaver CS3? I have upgraded from GoLive 6.01 and it was easy there! Thanks in advance -
close my project that is in a browser window (close this window)
How can I do this with a button? What do I have to put into button? -
MIAW forget window vs. close window
I'm having a problem with forget window. Sometimes when I forget a window, the projector crashes. The problem sometimes happens the first time I... -
how to close a javascript window when asp script end
i open the file download.asp from another main.asp page using window.open what the problem is when i clikc on the hyperlink it prompts me the ie... -
window sizing & close this window code
Sharon wrote on 16 jul 2003 in microsoft.public.inetserver.asp.general: No ASP to be seen, Sharon, please see a clientside NG, --... -
Vidar Petursson #2
Re: Close window with JavaScript
Hi
If your app did not open the window ( window.open ) you will get a confirm
box
[url]http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/close_0.asp[/url]
There is a hack but I don't think its a good idea using it so I wont post it
:)
--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"John H." <jhe_bc@yahoo.ca> wrote in message
news:5112cc93.0306281152.3c12ad49@posting.google.c om...> 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
Vidar Petursson Guest
-
Kevin Spencer #3
Re: Close window with JavaScript
window.opener = self;
window.close();
HTH,
Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
[url]http://www.takempis.com[/url]
Big things are made up of
lots of Little things.
"John H." <jhe_bc@yahoo.ca> wrote in message
news:5112cc93.0306281152.3c12ad49@posting.google.c om...> 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
Kevin Spencer Guest



Reply With Quote

