PC Review


Reply
Thread Tools Rate Thread

AJAX modal popup displays when it shouldn't

 
 
=?Utf-8?B?QWxCcnVBbg==?=
Guest
Posts: n/a
 
      30th May 2007
I have a situation in which I need to check for data in either of two fields
and display an alert if neither field contains data or if both fields contain
data when the user clicks on a View button; these two fields are for Member
Number and for Social Security Number. I have written a Javascript function
to handle that situation. A new condition was thrown at me yesterday in
which I need to display a modal popup only if a Social Security Number is
entered so the user can select from either of two systems containing the
data. I have the modal popup constructed, but it displays when it shouldn't.
For instance, taking the case of both fields being empty or both fields
containing data: on clicking the View button, an alert is displayed (via the
Javascript function) and dismissed by clicking on its OK button, but then the
modal popup gets displayed. In another case, the modal popup gets displayed
if the user enters a Member Number and clicks the View button.

In the aspx file, I have OnClick for the View button call the cmdView_Click
function in my code-behind. The OnClientClick is defined to "return
validateForm();"; in other words, to execute the Javascript function
mentioned in the first paragraph. Since the AJAX ModalPopupExtender requires
a TargetControlID, I have it pointing at my View button.

I can modify my Javascript function to allow it to branch either of two ways
depending on whether a Member Number or a Social Security Number is entered,
but is there anyway to somehow tie the AJAX ModalPopupExtender back in to my
Javascript function rather than the View button so as to force the popup to
display ONLY if a Social Security Number has been entered?

Thanks!

 
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
AJAX: modal popup extender James Page Microsoft ASP .NET 5 24th Sep 2008 10:56 AM
using Ajax Modal popup fran_j_diaz@yahoo.fr Microsoft ASP .NET 2 24th Apr 2008 01:10 PM
AJAX Modal Popup SE.Computerguy Microsoft ASP .NET 4 11th Sep 2007 03:40 PM
AJAX Modal Popup disappearance Samuel Rhodes Microsoft ASP .NET 1 20th Apr 2007 05:01 PM
AJAX.net modal popup Not Me Microsoft ASP .NET 3 8th Jan 2007 09:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:01 AM.