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 2 7722
Hi
If your app did not open the window ( window.open ) you will get a confirm
box http://msdn.microsoft.com/library/de...ds/close_0.asp
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." <jh****@yahoo.ca> wrote in message
news:51**************************@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
window.opener = self;
window.close();
HTH,
Kevin Spencer
Microsoft FrontPage MVP
Internet Developer http://www.takempis.com
Big things are made up of
lots of Little things.
"John H." <jh****@yahoo.ca> wrote in message
news:51**************************@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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: John H. |
last post by:
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"...
|
by: Carol Lyn |
last post by:
Could use your assistance with this. I have a window that opens via
onclick and it is a small window with info about a site. If the user
is interested in visiting that site, there is a link to...
|
by: Simon Fletcher |
last post by:
Hello there,
I need a "Close Window" script ( onLoad.Close.Window() ), however i need the
script so it don't come up with this annoying window:
"This window is trying to close" window.
Is...
|
by: Irvin Amoraal |
last post by:
Process:
I have a form which uploads a file from client to server written in PHP.
When the user presses the submit button, I use the "onSubmit" event to
execute javascript to open a child window...
|
by: marcelf3 |
last post by:
Hello..
This page opens a window with some information, but everytime the user
changes a field in the parent window, the child window needs to be
closed.
These 2 functions were supposed to do the...
|
by: GrantS |
last post by:
I am having a problem closing a popup window opened modally. When I
try to close the window (when the user hits save button and the data
has been processed), the Popup window opens as a full screen...
|
by: lindanr |
last post by:
In ASP.NET 2005 I have an onblur="window.close()" javascript event in the
<body> tag. When I click on the window's scrollbar, the window closes. The
same code works fine in ASP.NET 2003.
Any...
|
by: Toccoa |
last post by:
After considerable googling - I mean searching with Google(r) - I
could not find javascript on a button or <a href=... to close a
window in the latest versions of IE and FireFox.
There seemed...
|
by: kurt sune |
last post by:
Hello, I have a weird problem, I hope someone can explain this for me.
I have a webpage using masterpage.
In it I create a popup window using this code:
Dim js As String = "<script...
|
by: =?Utf-8?B?UGF1bA==?= |
last post by:
I am looking for a java script to close a web form that I can attatch to a
button click event. I am using vs2005, c#.
Thanks
--
Paul G
Software engineer.
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |