[CLOSED] number formatting

  1. #1

    [CLOSED] number formatting

    hi,

    i trying to format the number in the textfield, but it produce the javascript error.. plz see the below code.. how to format the number in textfield?

    <ext:TextField ID="TextField1" runat="server" MaskRe="/[0-9\$\.]/"> 
        <Listeners> 
            <Change Handler="el.setValue(Ext.util.Format.number(newValue, '0.00'));" /> 
        </Listeners> 
    </ext:TextField>
    Last edited by geoffrey.mcgill; Jul 28, 2010 at 9:03 PM.
  2. #2
    Hello, majestic!

    I've tried your code and it works fine.

    <!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></title>
    </head>
    <body>
        <ext:ResourceManager runat="server">
        </ext:ResourceManager>
        <form id="form1" runat="server">
        <ext:TextField ID="TextField1" runat="server" MaskRe="/[0-9\$\.]/">
            <Listeners>
                <Change Handler="el.setValue(Ext.util.Format.number(newValue, '0.00'));" />
            </Listeners>
        </ext:TextField>
        </form>
    </body>
    </html>
    Could you explain what exactly error occurs, what time (page loading, typing text), what browser, etc.?
    Providing us a sample code to reproduce the issue would be much better.
  3. #3

    Format

    hi,
    i have got the js error, removing focus from textfield after typing the numbers and i used IE7 and latest version of coolite dll... i used below code...




    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <title>Untitled Page</title>
    </head>
    <body> 
    <form id="form1" runat="server"> 
    <ext:ScriptManager ID="clscpmgrTrader" runat="server">
    </ext:ScriptManager> 
    <ext:TextField ID="TextField1" runat="server" MaskRe="/[0-9\$\.]/"> 
    <Listeners> 
    <Change Handler="el.setValue(Ext.util.Format.number(newValue, '0.00'));" /> 
    </Listeners> 
    </ext:TextField> 
    </form>
    </body>
    </html>
  4. #4

    Error

    hi,

    i got Microsoft JScript runtime error: Object doesn't support this property or method Error.....
  5. #5
    Hi,

    Ext.util.Format.number is introduced in the ExtJS 3.0 therefore it is not accessible in the Coolite 0.8.2 (only in the Ext.Net 1.0)
  6. #6

    Ext.Net 1.0

    hi,

    how i can get Ext.Net 1.0 version of the dll... where i can download.......
  7. #7
    Hi,

    Please use the following url to download Ext.Net 1.0
    http://svn.ext.net/premium/branches/1.0.0

    Also please read the following files before
    http://svn.ext.net/premium/branches/.../CHANGELOG.txt
    http://svn.ext.net/premium/branches/...atsNew_1.0.txt

Similar Threads

  1. [CLOSED] Formatting Number Decimal & thousand seperator
    By FpNetWorth in forum 1.x Legacy Premium Help
    Replies: 14
    Last Post: Mar 30, 2015, 1:06 PM
  2. Formatting number for NumberField
    By fac in forum 1.x Help
    Replies: 1
    Last Post: Jan 30, 2012, 4:02 PM
  3. [CLOSED] Possible Bug: FormGroup Formatting
    By logicspeak in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Oct 25, 2011, 6:46 PM
  4. [CLOSED] Formatting the FormPanel
    By sadaf in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 20, 2011, 1:59 PM
  5. Replies: 0
    Last Post: Aug 30, 2011, 2:48 PM

Posting Permissions