javascript - Pass an integer array from JSP to JS -


in jsp have integer array each integer has 19 digits. passing array javascript function. since javascript supports numbers in range +/- 9007199254740992, last 3 digits of integers in integer array converted zeroes.

for example in jsp - integer array [6918384653328004118 , 9016587993063058147] in javascript function, receive integer array [6918384653328004000 , 9016587993063058000]

please let me know how can pass complete 19 digit integer array javascript function.

thanks, surabhi

if not intend use these integers calculation, can pass javascript strings , treat them strings in js code?

instead of generating array of numbers ([6918384653328004118 , 9016587993063058147]), change jsp wraps numbers in quotes (["6918384653328004118" , "9016587993063058147"]). javascript interprets array of strings.


Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -