Page 1 of 1
Difference in JavaScript vs. VB tools

Posted:
Mon Apr 24, 2006 10:15 am
by lkhaas(Legacy Member)
When using the function code128Auto (passing value '123456789') I get two different results depending on whether I use the JavaScript code or the the Visual Basic code that was downloaded from the Morovia site. Which is correct?
Re: Difference in JavaScript vs. VB tools

Posted:
Mon Apr 24, 2006 12:47 pm
by glitch (legacy member)
I made a couple of simple tests.
The result for VB code is correct. The Javascript code seems to have a bug which produces the incorrect results encoding odd-lenght numbers.
Re: Difference in JavaScript vs. VB tools

Posted:
Mon Apr 24, 2006 2:56 pm
by glitch(Legacy Member)
Re: Difference in JavaScript vs. VB tools

Posted:
Tue Apr 25, 2006 8:39 am
by lkhaas(Legacy Member)
Looks like the code posted in the article has a few problems. Both in the first line to be replaced. I included details in my comments on the article but it was an incorrect parenthesis and using isNumber rather than isNumeric. But with those changes it seems to solve the problem I encountered. Thanks for the speedy response!
Re: Difference in JavaScript vs. VB tools

Posted:
Tue Apr 25, 2006 10:04 am
by glitch(Legacy Member)
Thanks for pointing out the problem. The function isNumber should be changed to IsNumeric. We have modified the article to reflect the change.
Edited by glitch on April 25 2006 at 10:04am