Jump to content

Enable / disable the event "form.Onkeypress"


Javi

Recommended Posts

Hello.

I want to enable / disable the event "form.Onkeypress".
I have put this:

 

Form.Script ==> 'var RUN = false;'

Form.ExtEvents.1-Ext.form.FormPanel ==>
function form.Onkeypress(sender, key)
{
   if (RUN == false) {
      sender.preventDefault();
   };
}

And it works. But not like putting 'RUN = True;'.

¿Someone can help me? As you see, my knowledge of JavaScript are very low.

Thank you.

 

===========================================================

 

Hola.

Yo quiero habilitar/deshabilitar el evento "form.Onkeypress".
Yo he puesto esto:

Form.Script ==> 'var RUN = false;'

Form.ExtEvents.1-Ext.form.FormPanel ==>
function form.Onkeypress(sender, key)
{
   if (RUN == false) {
      sender.preventDefault();
   };
}

Y funciona. Pero  no se como poner 'RUN = True;'.

¿¿Alguien me puede ayudar?? Como vosotros veis, mis conocimientos de JavaScript son muy bajos.

 

Gracias.
 

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...