I have the following HTML:
<tr id="row_1" data-rk="02000008" data-pk="0001I">
When I check this with firebug it shows as:
dataset DOMStringMap { rk="02000008", pk="0001I"}
pk "0001I"
rk "02000008"
I then use jQuery to read this:
var pk = $("tr[id='row_" + row + "']").data('pk')
var rk = $("tr[id='row_" + row + "']").data('rk')
However this is what the firebug debuggers shows when I check the values in my javascript. They are also the same values that are later sent to my C# code in an Ajax call.
pk shows as "0001I"
rk shows as 2000008
Can someone explain this? Both rk and pk are coded in the same way, both have one or more leading zeros but the one returns as a string and the other as a number.
Javascript autoparses so the trailing ‘I’ in
"0001I"causes javascript to interpret it as a string