Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ConfirmButtonExtender not working

Status
Not open for further replies.

jimktrains

IS-IT--Management
Jan 19, 2007
50
US
I have several pages where I use a ConfirmButtonExtender for my Delete button and they all work except for on one page. When I click the Delete button, nothing happens. No Cofirm message box, and the onClick event never fires. If I remove the ConfirmButtonExtender, the onClick event will fire. I have several CalendarExtenders on the page and they work so my Ajax Toolkit is seen and I have the ScriptManager included, before any extender is used. I also get no errors. I've even copied and pasted the exact code for the button and extender from another page that works with no change. What can I look for that could be a problem?
 
code would help. can't do much without that. Since it's working on every other page except this one I would assume the extender is not properly configured for the button in question.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
faq732-7259
 
I found the problem. I had a function in the <script> section that I named confirm(). When I take it out, the confirmButtonExtender works. Put it back in and it didn't work. So I renamed it doconfirm() and it works. Is there some conflict with a reserved keyword of confirm? Maybe in the ConfirmButtonExtender there is a function named confirm? Is there any way to know what we can and can't use when using the AJAX Toolkit? An error message might have been nice.
 
Is there some conflict with a reserved keyword of confirm?
confirm creates a confirmation message box. the same way alert creates an OK message box.
Is there any way to know what we can and can't use when using the AJAX Toolkit?
it has nothing to do with the framework. it's a reserved word in javascript. so knowing the language(s) you are using will help you avoid these types of errors in the future.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top