TextField Key press event

  1. #1

    TextField Key press event

    Hi All:

    I'm very new with the Ext.Net, I'm facing a little problem on how to fire the key press event on a text field.
    What I want to do actually, I have a textField and a htmlEditor, in run time if i enter a text into the textField
    then an event will be fired & it will add the input text into the htmlEditor finally display all the value into the html editor.

    I need your help, thanks in advanced.

    Regards,
    Md. Marufuzzaman
    Last edited by maruf.zaman; Nov 30, 2010 at 6:41 AM.
  2. #2
    Hi,

    Welcome to Ext.Net:)

    Please look at the example.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        <ext:TextField runat="server" EnableKeyEvents="true">
            <Listeners>
                <KeyPress Handler="alert('You pressed on the common key with code ' + e.getKey())" />
                <SpecialKey Handler="alert('You pressed on the \'special\' key with code ' + e.getKey())" />
            </Listeners>
        </ext:TextField>
        </form>
    </body>
    </html>

Similar Threads

  1. Replies: 2
    Last Post: Apr 28, 2012, 8:34 AM
  2. [CLOSED] TextField: Help with Remove SelectedText on Blur event
    By nhg_itd in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 31, 2012, 1:12 AM
  3. Click on disabled TextField - catch the event
    By AlexMaslakov in forum 1.x Help
    Replies: 1
    Last Post: Nov 14, 2011, 12:31 PM
  4. Dynamic TextField KeyUP Event
    By archana in forum 1.x Help
    Replies: 0
    Last Post: Oct 21, 2011, 6:23 AM
  5. Replies: 7
    Last Post: Nov 25, 2010, 4:18 PM

Posting Permissions