I\'m passing as parameter an id to a javascript function, because it comes from UI, it\'s left zero padded. but it seems to have (maybe) \"strange\" behaviour?
Unless you can intercept a string version of this number, you're out of luck.
That being said, if you can get a string version of your octal (calling toString() won't help), this will work:
toString()
parseInt(variable_string.replace(/^0+/, ''), 10);