Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disabling a button with IE 7.0
Message
De
07/10/2013 12:51:45
 
 
À
07/10/2013 11:35:27
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01584896
Message ID:
01584920
Vues:
35
>>I think that only applied to 'option' controls - not 'input'
>>
>>However, I thought that if you disabled before submitting then the submit doesn't happen. i.e. your code should be:
loButton.Attributes.Add("onClick", "document.Form1.submit(); this.disabled=true; return false;");
>
>I can tell you that this is at large, at the highest level of the framework, and the submit always work. :)

Hmm. Quick test:
        protected void Page_Load(object sender, EventArgs e)
        {
            theButton.Attributes.Add("onClick", "this.disabled=true; document.Form1.submit(); return false;");
          //theButton.Attributes.Add("onClick", "document.Form1.submit(); this.disabled=true; return false;");

            if (IsPostBack)
            {
                int i = 0; 
                // If 'disabled' is first: Firefox - works. button disabled, postback
                //                         Chrome - button disabled, no postback
                // If 'submit' is first :  Firefox - postback, button not disabled
                //                         Chrome - postback, button not disabled
            }
        }
Didn't test IE...
>
>But, despite the fact that this no support was only referencing to other controls, I believe it might have applied also to buttons. The situation might be caused because of the usage of "true" instead of "disabled". That is why I need to complete the installation of IE, currently in progress, and take a look at this.

Pls let us know what you find
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform