Subj : Re: Does Rhino support new functions on prototypes? To : "David M. Goudreau" From : Igor Bukanov Date : Mon Apr 07 2003 11:57 pm David M. Goudreau wrote: > I tried your suggestion of using String(document.MyForm.NAME.value).trim(), but I still get the > same error, that trim is not a function. Any other suggestions? Then I suspect that HttpUnit does not preserve Scope context between scripts from different tags. The code example you gave works without any problems in ICEbrowser that uses Rhino without any modifications, so this is clearly HttpUnit issue. Regards, Igor > > > -dmg > > > --- Igor Bukanov wrote: > >>David M. Goudreau wrote: >> >>>Does Rhino support the following code? >>> >>>============= >>> >>>============ >>> >>>============ >>> >>>I'm getting an error on this Javascript when I use HttpUnit. The >>>owner of HttpUnit (Russell Gold) said that it was a Rhino issue, not >>>an HttpUnit issue. The error I'm getting is "trim is not a function" >>>when accessing the page containing the above Javascript. >> >>If type of value is not JavaScript string, then String.prototype.trim >>would have no influence on it. This type is defined by HttpUnit DOM >>bindings for JavaScript, not Rhino itself. If you replace the above code >>by String(document.MyForm.NAME.value).trim() and it would work, then >>probably Httpunit does not properly configure Rhino to convert value to >>JavaScript string. >> >>Regards, Igor >> > > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Tax Center - File online, calculators, forms, and more > http://tax.yahoo.com > .