Click here to Skip to main content
15,922,007 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Use radiobutton and checkbox together Pin
Richard MacCutchan4-Feb-21 22:52
mveRichard MacCutchan4-Feb-21 22:52 
GeneralRe: Use radiobutton and checkbox together Pin
Member 150649444-Feb-21 23:57
Member 150649444-Feb-21 23:57 
GeneralRe: Use radiobutton and checkbox together Pin
Richard MacCutchan4-Feb-21 23:59
mveRichard MacCutchan4-Feb-21 23:59 
GeneralRe: Use radiobutton and checkbox together Pin
Richard Deeming5-Feb-21 0:47
mveRichard Deeming5-Feb-21 0:47 
GeneralRe: Use radiobutton and checkbox together Pin
Richard MacCutchan5-Feb-21 1:01
mveRichard MacCutchan5-Feb-21 1:01 
AnswerRe: Use radiobutton and checkbox together Pin
Richard Deeming5-Feb-21 1:17
mveRichard Deeming5-Feb-21 1:17 
GeneralRe: Use radiobutton and checkbox together Pin
Member 150649445-Feb-21 1:44
Member 150649445-Feb-21 1:44 
QuestionHow to use decimals (0.01) in Javascript function Pin
Member 150641013-Feb-21 18:17
Member 150641013-Feb-21 18:17 
AnswerRe: How to use decimals (0.01) in Javascript function Pin
Richard MacCutchan3-Feb-21 22:54
mveRichard MacCutchan3-Feb-21 22:54 
GeneralRe: How to use decimals (0.01) in Javascript function Pin
mikehunterr5-Feb-21 1:08
professionalmikehunterr5-Feb-21 1:08 
GeneralRe: How to use decimals (0.01) in Javascript function Pin
Richard MacCutchan5-Feb-21 1:09
mveRichard MacCutchan5-Feb-21 1:09 
GeneralRe: How to use decimals (0.01) in Javascript function Pin
mikehunterr5-Feb-21 1:19
professionalmikehunterr5-Feb-21 1:19 
QuestionAssignment Help Pin
Member 150639523-Feb-21 13:12
Member 150639523-Feb-21 13:12 
AnswerRe: Urgent Java Assignment Help Pin
Richard Deeming3-Feb-21 21:45
mveRichard Deeming3-Feb-21 21:45 
Questionhow can i unmute a video using js for chrome Pin
Member 148717432-Feb-21 23:28
Member 148717432-Feb-21 23:28 
AnswerRe: how can i unmute a video using js for chrome Pin
Richard Deeming3-Feb-21 0:41
mveRichard Deeming3-Feb-21 0:41 
QuestionTrying to limit a input type=text only decimal values with 2 digits after decimal Pin
simpledeveloper1-Feb-21 21:14
simpledeveloper1-Feb-21 21:14 
I am working on an Ember application, I have a following JavaScript Code written to limit the entry of digits after decimal, this function is called in Key-Down event. Its working but what it is doing it, it allowing 3 digits after decimal but when I am posting its value on the Service, that is taking correctly 2 digits after decimal but what it is showing in the Textbox is 3 digits after decimal.
And another request if possible is, can I do the same without using id attribute on the Textbox.

Any help please, thanks in advance.

allowOnly2Decimals: function (e1, event) {                
                var boxId = '#' + event.path[0].id;

                if ((event.keyCode == 190) || (event.keyCode == 110)) {
                    this.decimalPressed = true;
                }

                if (this.decimalPressed) {
                    var t = e1.toString().split('.');

                    if (t[1] != null) {
                        if (t[1].length == 2) {
                            this.limitDecimal = e1;                           
                            $(boxId).val(e1);
                        }

                        if (t[1].length >= 2) {
                            e1 = this.limitDecimal;
                            $(boxId).val(e1);

                            return false;
                        }
                    }
                }                          
            }

AnswerRe: Trying to limit a input type=text only decimal values with 2 digits after decimal Pin
Richard Deeming1-Feb-21 21:47
mveRichard Deeming1-Feb-21 21:47 
GeneralRe: Trying to limit a input type=text only decimal values with 2 digits after decimal Pin
simpledeveloper2-Feb-21 6:43
simpledeveloper2-Feb-21 6:43 
QuestionIs there a delicate way to pass calendar events variables in Javascript Pin
Member 1505943129-Jan-21 0:04
Member 1505943129-Jan-21 0:04 
AnswerRe: Is there a delicate way to pass calendar events variables in Javascript Pin
Richard Deeming29-Jan-21 0:16
mveRichard Deeming29-Jan-21 0:16 
GeneralRe: Is there a delicate way to pass calendar events variables in Javascript Pin
Member 1505943129-Jan-21 1:58
Member 1505943129-Jan-21 1:58 
GeneralBuild an entire React application in one command Pin
DonJon28-Jan-21 19:22
DonJon28-Jan-21 19:22 
GeneralRe: Build an entire React application in one command Pin
Richard Deeming28-Jan-21 22:14
mveRichard Deeming28-Jan-21 22:14 
QuestionBest way to trace JavaScript Conflict Pin
ReverseAds10-Jan-21 20:35
ReverseAds10-Jan-21 20:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.