Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language

Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Asp.Net Programming

AJAX modal popup displays when it shouldn't

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?


Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc