RadNumericTextBox properly not working in Mozila 10.0

8 posts, 0 answers
  1. Perfect
    Perfect avatar
    40 posts
    Member since:
    Sep 2010

    Posted 10 Feb 2012 Link to this post

    Hi Team,
     
       In my appliation I'm using RadNumericTextbox, here I want allow only numeric numbers in textbox, when I'm running the application in IE browser RadNumericTextbox  running fine, but If you try to running in Mozila, I found an issue i.e.., numbers and also take characters enter into text box. I'm using Telerick Q4 Version2010, and Browser is Mozila 10.0.  for ur reference Below I mention using code. Please help me asap and also I attachment .

    <script type="text/jscript">
            function KeyPress(sender, args) {
                //debugger;
                if (args.get_keyCharacter() == sender.get_numberFormat().DecimalSeparator ||
                     args.get_keyCharacter() == sender.get_numberFormat().NegativeSign) {
                    args.set_cancel(true);
                }
            }
        </script>

     

    <telerik:RadNumericTextBox ID="txtDecisionNumber" runat="server" MaxLength="100"    

     

    CssClass="InnerTextStyle" Width="95%" Type="Number" MinValue="0" NumberFormat-DecimalDigits="0"     

     

    NumberFormat-GroupSeparator="" AllowOutOfRangeAutoCorrect="true" NumberFormat-KeepNotRoundedValue="false"      

     

    NumberFormat-AllowRounding="true">

      <ClientEvents OnKeyPress="KeyPress" />  

     

    </telerik:RadNumericTextBox>

    Thanks d Advance
    Mr. Perfect

     

  2. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 10 Feb 2012 Link to this post

    Hello,

    Use some Firefox debugging console to see if you are getting an JavaScript error on your page. You could use Firebug for this purpose.
    If you are getting any JavaScript error in your page the controls will not work as expected.

    Kind regards,
    Vasil
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Perfect
    Perfect avatar
    40 posts
    Member since:
    Sep 2010

    Posted 10 Feb 2012 Link to this post

    Hi,

     Thanks for quick reply.
       I already download firebug in my machine. I did not get any java script error message.
      so, can you tell me other way how to I solve this issue.

    Thanks in Advance.
  5. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 10 Feb 2012 Link to this post

    Hi,

    If you are not getting any error and the NumericTextBox does not work correctly in the same time it could be that  the client scripts are not loaded at all. Could you see the Net log and confirm that the page's scripts are loaded correctly?

    Kind regards,
    Vasil
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  6. Perfect
    Perfect avatar
    40 posts
    Member since:
    Sep 2010

    Posted 14 Feb 2012 Link to this post

    Hi ,



    My requirement is to allow only positive integers(>0) not even decimal numbers. . So I've defined the radnumeric textbox in the above manner.
    It is working exactly as per the requirement in Internet explorer but in Mozilla 10.0 when debugged with firebug it says
    KeyPress is not found.
    let me know what shall be done to get solve this issue.
  7. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 14 Feb 2012 Link to this post

    Hi,

    Check your custom JavaScript code, if it has some error the browser will not be able to find the KeyPress(sender, args) function that you have defined. The problem could be even a missing closing/opening bracket, or something similar that will pass in IE but not in Firefox.

    If you unable to find any error in your scripts, you could share the whole page with us and we will try to find the problem.

    All the best,
    Vasil
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  8. Perfect
    Perfect avatar
    40 posts
    Member since:
    Sep 2010

    Posted 24 Feb 2012 Link to this post

    there are no errors in the file.
    Just take the above code and run in mozilla you can find the same.
  9. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 24 Feb 2012 Link to this post

    Hi,

    Change the:
    <script type="text/jscript">
    to
    <script type="text/javascript">

    And it should work correct. The problem in Firefox is that it could not load the script and then when the control initializes the KeyPress is null.

    Greetings,
    Vasil
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017