Menu

#248 javascript conv. of int "0" to string gives "0.0"

closed-fixed
None
5
2004-12-26
2004-12-17
No

I have an app with a javascript function that takes an
integer and assigns it to a form field (integer to
string, essentially). When I run this in FireFox and
IE, it works as expected.

When I test it in HttpUnit (1.6), if I send the integer
"0" to the function, the field gets set to "0.0".

I'm attaching a test case that includes a small webapp
and a test class. The test case doesn't include the
jars needed to compile and run the test case. The
README.txt describes what jar files are needed, and
where to put them.

Discussion

  • David M. Karr

    David M. Karr - 2004-12-17

    test case containing webapp and test class

     
  • lavakafle

    lavakafle - 2004-12-20

    Logged In: YES
    user_id=1113175

    The problem is actually in webResponse =
    conversation.getCurrentPage();

    U might have checked as

    webResponse = webForm.submit(); in stead of doing
    getcurrentpage.

     
  • David M. Karr

    David M. Karr - 2004-12-20

    Logged In: YES
    user_id=308349

    I don't understand what your point is.

     
  • Russell Gold

    Russell Gold - 2004-12-26
    • assigned_to: nobody --> russgold
    • status: open --> closed-fixed
     
  • Russell Gold

    Russell Gold - 2004-12-26

    Logged In: YES
    user_id=37920

    Fixed in CVS. Thanks for the example. This one baffled me
    because I had fixed the case of:

    document.form.param = something

    but not

    document.form.param.value = something

    which is handled differently

     

Log in to post a comment.

MongoDB Logo MongoDB