This is a migrated thread and some comments may be shown as answers.

RadNumericTextBox properly not working in Mozila 10.0

7 Answers 130 Views
Input
This is a migrated thread and some comments may be shown as answers.
Perfect
Top achievements
Rank 1
Perfect asked on 10 Feb 2012, 02:02 PM
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

 

7 Answers, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 10 Feb 2012, 04:07 PM
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 >>
0
Perfect
Top achievements
Rank 1
answered on 10 Feb 2012, 04:22 PM
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.
0
Vasil
Telerik team
answered on 10 Feb 2012, 04:43 PM
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 >>
0
Perfect
Top achievements
Rank 1
answered on 14 Feb 2012, 01:23 PM
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.
0
Vasil
Telerik team
answered on 14 Feb 2012, 03:34 PM
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 >>
0
Perfect
Top achievements
Rank 1
answered on 24 Feb 2012, 11:24 AM
there are no errors in the file.
Just take the above code and run in mozilla you can find the same.
0
Vasil
Telerik team
answered on 24 Feb 2012, 02:15 PM
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.
Tags
Input
Asked by
Perfect
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Perfect
Top achievements
Rank 1
Share this question
or