Skip to content
Advertisement

Tag: laravel-5

Prevent truncating of preceeding zeros in Javascript

I am trying to pass variable to a JavaScript function that then makes an Ajax request using the variable. My problem is that if the value of the variable starts with zeros, the zeros are truncated. For example, if the value is 00056, what is sent for an Ajax call is 56 Here is what I am doing How do

Advertisement