473,503 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

popup window close to submit opener window without 'causes validation' happening

Howdy

I've got a ASP.NET webform page that pops up a window for a user to make a
selection. Once they make a selection in this popup window, the form in the
popup is submitted an update to the DB is fired, the window closes, and the
opener window's (server) form is submitted (via JavaScript) (so that any
form changes that were made are retained) and the newly loaded page shows
the new selections from the popup window.

However, the newly loaded page also shows any validation messages, which
whilst not a huge problem, I'd rather not have for cleanliness' sake. What
can I do via JavaScript to submit the opener form but not have the .NET
'causes validation' happen?

Can I use the JavaScript to call some hidden/dummy/zero width button (either
HTML or .NET), or is there some better method?

Thanks for any suggestions.
Cheers
Matt
Dec 16 '05 #1
1 3475
sorted.

I used a <a href="" runat="server" id="test"
onclick="javascript:myjavascript();">test</a> to open the popup window.

I the popup window I used the javascript:

window.opener.__doPostBack('test','');
self.close();

to call the dotnet postback function, specifying my <a> tag as the 'sender',
hence no "causesvalidation" firing.

I originally had a asp.net linkbutton however that submitted my page each
time it was clicked, and which was an unnecessary and annoying superfluous
page submit, but now this doesn't happen.

Matt

"Matt Jensen" <re***************@microsoft.com> wrote in message
news:eE**************@TK2MSFTNGP14.phx.gbl...
Howdy

I've got a ASP.NET webform page that pops up a window for a user to make a
selection. Once they make a selection in this popup window, the form in
the popup is submitted an update to the DB is fired, the window closes,
and the opener window's (server) form is submitted (via JavaScript) (so
that any form changes that were made are retained) and the newly loaded
page shows the new selections from the popup window.

However, the newly loaded page also shows any validation messages, which
whilst not a huge problem, I'd rather not have for cleanliness' sake. What
can I do via JavaScript to submit the opener form but not have the .NET
'causes validation' happen?

Can I use the JavaScript to call some hidden/dummy/zero width button
(either HTML or .NET), or is there some better method?

Thanks for any suggestions.
Cheers
Matt

Dec 16 '05 #2

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

Similar topics

2
4348
by: Moon | last post by:
Seems I still haven't got the hang of all those window generating code in Javascript. I've got a page with about 15 photo thumbnails. When you click on a thumbnail a new window pops up which shows...
38
5001
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find...
1
15994
by: fogwolf | last post by:
First a basic outline of what I am trying to do: I want to have a page spawn a pop-up when you click "submit" on its form. On this pop-up page there will be another form. When you click "submit"...
6
9846
by: mkobus | last post by:
Im relatively new, so please be patient with me... I need to update a parent .aspx screen from a popup and close the popup. Normally I would use...
2
6916
by: jackson2005 | last post by:
OK, I need to do three different things. On the ONLOAD event I would like a popup box to open. In this popup box I need two text boxes. One for the UserName and one for the BillingTo name. ...
8
1888
by: JJ | last post by:
Whats the best way to pass a variable from a popup to the current page (without a postback on the current page). I have a form on 'page1' with various text input boxes. One box contains an image...
4
21259
by: Gabriella | last post by:
Hi, I have a popup window that opens from a page on my website. This popup is a form with several fields. Upon submit button it redirects to a server side ASP page which writes all data to the...
5
7509
by: asadhkhan | last post by:
I have the following code which works correctly in IE 6, but in IE 7, Fire Fox 2.0 and Netscape 8 it does not work. I have a main page where a button calls this pop-up and uploads a file once you...
11
5264
by: V S Rawat | last post by:
using Javascript, I am opening a web-based url in a popup window. MyWin1=Window.Open(url, "mywindow") There is a form (form1) in the url in that popup window, I need to submit that form. ...
0
7280
Oralloy
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,...
0
7330
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...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5578
agi2029
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,...
1
5014
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...
0
4672
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...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
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 ...
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.