Subj : Re: Does Rhino support new functions on prototypes? To : "David M. Goudreau" From : Igor Bukanov Date : Sat Apr 05 2003 01:39 am 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 .