Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi All,

In side button event I disable the textboxes and displaying confirm message box(by calling javascript function from button click event). But when I run the application the textboxes are not disabled until I close the confirm box.

How to make this. Please help on this
Posted
Updated 7-Jan-16 1:30am
v2
Comments
dan!sh 7-Jan-16 7:45am    
Update the question with the code you have. You might be showing alert before you disable the controls.

1 solution

The problem is disabling and re-enabling of controls is completely solved in the section 3 of my article, sub-sections "Temporarily Disabled Elements" and "Workaround for Mozilla" (yes, I revealed a bug in Mozilla and reported it to their team): Modal Popup From Scratch[^].

But please better read the whole article; it's all relevant to your problem. First of all, I explain that confirm is hardly suitable for production-level applications. You rather need a modal behavior emulated on a single page, the mechanism loosely referred to as "modal popup". You don't have to use my code (but you can); in particular, you can just use my explanations; you can use alternatives such as jQuery Dialog or other (3rd-party) jQuery plug-ins.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900