Reporter, always include your buildID since this bug is a dupe of bug #112241 fixed on the trunk on 2002-01-28. However, the patch didn't make 0.9.8. If you're using 0.9.8 or a "pre 01-28 trunk", please mark this bug as a duplicate of bug #112241.
In the meantime, reassigning to HTML Form Controls component for parity with the probable dupe. This is an embedding issue, not a JS Engine issue. JS Engine deals with lower-level functionality like Number(), String(), and Date() and is not aware of browser components.
*** This bug has been marked as a duplicate of 112241 ***