Click here to Skip to main content
15,946,316 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestiontoLocaleString() works to insert commas in a asp.net textbox until I enter the eighth digit. The eight digit breaks the insertion of commas Pin
fig00006-Jul-24 12:10
fig00006-Jul-24 12:10 
AnswerRe: toLocaleString() works to insert commas in a asp.net textbox until I enter the eighth digit. The eight digit breaks the insertion of commas Pin
Richard Deeming7-Jul-24 21:17
mveRichard Deeming7-Jul-24 21:17 
GeneralRe: toLocaleString() works to insert commas in a asp.net textbox until I enter the eighth digit. The eight digit breaks the insertion of commas Pin
fig00008-Jul-24 4:25
fig00008-Jul-24 4:25 
GeneralRe: toLocaleString() works to insert commas in a asp.net textbox until I enter the eighth digit. The eight digit breaks the insertion of commas Pin
Richard Deeming8-Jul-24 6:43
mveRichard Deeming8-Jul-24 6:43 
GeneralRe: toLocaleString() works to insert commas in a asp.net textbox until I enter the eighth digit. The eight digit breaks the insertion of commas Pin
fig00009-Jul-24 4:42
fig00009-Jul-24 4:42 
GeneralRe: toLocaleString() works to insert commas in a asp.net textbox until I enter the eighth digit. The eight digit breaks the insertion of commas Pin
Richard Deeming9-Jul-24 5:44
mveRichard Deeming9-Jul-24 5:44 
GeneralRe: toLocaleString() works to insert commas in a asp.net textbox until I enter the eighth digit. The eight digit breaks the insertion of commas Pin
Jeremy Falcon17-Jul-24 16:13
professionalJeremy Falcon17-Jul-24 16:13 
Thanks for handling this reply. Just a couple notes to help make the magic happen. parseInt should always have the second radix param specified. Otherwise, it'll attempt to guess it and not always possible to guess octal vs decimal, etc.

It's still safer to use replace over replaceAll. Edge support is only a few years old, for instance. Adoption just be a slow thing.

No need to convert the input to a string for parseInt. It's already a string. Check the fiddle below for proof.

Annnnnnnnnnd, JS now has a data type called BigInt. Which won't help for floating points / money type inputs. But if you're looking to do this with a much larger integer... Behold!

Edit: Awww crap, I just read your BigInt post. Never mind. Laugh | :laugh: Laugh | :laugh: Laugh | :laugh:
Jeremy Falcon


modified 5 days ago.

GeneralRe: toLocaleString() works to insert commas in a asp.net textbox until I enter the eighth digit. The eight digit breaks the insertion of commas Pin
jsc428-Jul-24 22:49
professionaljsc428-Jul-24 22:49 
GeneralRe: toLocaleString() works to insert commas in a asp.net textbox until I enter the eighth digit. The eight digit breaks the insertion of commas Pin
fig00009-Jul-24 4:32
fig00009-Jul-24 4:32 
GeneralRe: toLocaleString() works to insert commas in a asp.net textbox until I enter the eighth digit. The eight digit breaks the insertion of commas Pin
jschell18-Jul-24 14:32
jschell18-Jul-24 14:32 
GeneralRe: toLocaleString() works to insert commas in a asp.net textbox until I enter the eighth digit. The eight digit breaks the insertion of commas Pin
fig000018-Jul-24 20:02
fig000018-Jul-24 20:02 
QuestionCan we use the NuGet package of .Net in WebDriverIO (JavaScript) framework? Pin
Anand Sabley20-Jun-24 20:44
Anand Sabley20-Jun-24 20:44 
QuestionProgressbar has a value of 100% before upload progress is finished Pin
Red Kipling4-Jun-24 9:34
Red Kipling4-Jun-24 9:34 
AnswerRe: Progressbar has a value of 100% before upload progress is finished Pin
Richard Andrew x648-Jun-24 11:33
professionalRichard Andrew x648-Jun-24 11:33 
GeneralRe: Progressbar has a value of 100% before upload progress is finished Pin
Richard Deeming9-Jun-24 21:39
mveRichard Deeming9-Jun-24 21:39 
AnswerRe: Progressbar has a value of 100% before upload progress is finished Pin
jschell12-Jun-24 15:04
jschell12-Jun-24 15:04 
AnswerRe: Progressbar has a value of 100% before upload progress is finished Pin
Steve Raw17-Jun-24 10:34
professionalSteve Raw17-Jun-24 10:34 
QuestionProgressbar get only the size of first input Pin
Red Kipling2-Jun-24 0:43
Red Kipling2-Jun-24 0:43 
QuestionJqxTree control is taking time to load with 500 records Pin
yadta6-Feb-24 18:57
yadta6-Feb-24 18:57 
AnswerRe: JqxTree control is taking time to load with 500 records Pin
Richard Deeming6-Feb-24 21:33
mveRichard Deeming6-Feb-24 21:33 
GeneralRe: JqxTree control is taking time to load with 500 records Pin
jschell7-Feb-24 5:40
jschell7-Feb-24 5:40 
AnswerRe: JqxTree control is taking time to load with 500 records Pin
Prestige Somerville live27-Mar-24 20:10
Prestige Somerville live27-Mar-24 20:10 
Questionpassing 0 to a function Pin
mike741112-Jan-24 1:53
mike741112-Jan-24 1:53 
AnswerRe: passing 0 to a function Pin
Richard Deeming12-Jan-24 2:14
mveRichard Deeming12-Jan-24 2:14 
AnswerRe: passing 0 to a function Pin
Richard MacCutchan12-Jan-24 3:08
mveRichard MacCutchan12-Jan-24 3:08 

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.