PC Review


Reply
Thread Tools Rating: Thread Rating: 2 votes, 3.00 average.

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

 
 
Matt Jensen
Guest
Posts: n/a
 
      16th Dec 2005
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


 
Reply With Quote
 
 
 
 
Matt Jensen
Guest
Posts: n/a
 
      16th Dec 2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Popup window passes value to opener but not recognized Timo Microsoft ASP .NET 6 15th Jan 2008 12:48 AM
Refresh Form from Popup with window.opener Dave Microsoft C# .NET 4 29th Dec 2007 02:58 PM
Refresh Form from Popup with window.opener Dave Microsoft C# .NET 0 25th Dec 2007 10:10 PM
Save Data in Database; reload opener window from Popup window ASP. =?Utf-8?B?Sko=?= Microsoft ASP .NET 1 12th Oct 2004 08:23 PM
Reference window.opener after redirecting the popup Etienne Charland Microsoft ASP .NET 5 4th Sep 2004 08:57 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:40 AM.