473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

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?

Thanks!

May 30 '07 #1
0 1659

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

Similar topics

3
by: Not Me | last post by:
Hey, I'm using the MS AJAX libraries to achieve a modal popup window. Prior to using the toolkit control, I have a gridview and detailsview objects visible on the page.. when the gridview row...
1
by: Samuel Rhodes | last post by:
hi i am using a ajax modal popup to allow the user to search an item and select the required item from the list. whenever i try to search the item, which causes a post back....the modal popup...
3
by: SE.Computerguy | last post by:
I am trying to use the AJAX modal popup on a click event from a gridview. Any ideas on implementing this? The AJAX control is looking for a TargetControlID that will trigger the popup but the...
1
by: mbruyns | last post by:
i have been trying (and sometimes succeeding) to use the modalpopupextender to show various panels of controls on my asp pages. the strange problem that i keep on running into is that sometimes it...
16
malav123
by: malav123 | last post by:
Hi, I am using Ajax's modal popup extender to display the information about all the rows of gridview but the problem is when page loads, modal popup extender loads for all the...
10
malav123
by: malav123 | last post by:
Hi, In my master page i have right pannel, in which i am using the user control and collapsiblePanelExtender and in that right panel there is one link button named "Event", so...
4
by: fran_j_diaz | last post by:
Hi, I have a page with an Ajax modal popup. I would like to know when my Modal popup is opened, my page still able to modify. Is it possible ? (I use Visual Studio 2005, c# )
3
by: Mike Hofer | last post by:
Okay, here's the situation: we want to be able to display ASPX pages in an UpdatePanel. The reasons for this are performance related. The site in development uses *lots* of modal popups from some...
2
by: Alec MacLean | last post by:
Hi, I have a page using AJAX. The page has three modal popups that work fine when I don't have field validators in place. As soon as I put a validator in place, the popup "form" the validator...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
tracyyun
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...
0
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...

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.