John,
I'm not able to run your code, so my observations are based purely on
reading your email. From what I can gather, the problem lies in your
javascript, specifically the following assignment:
> var order_value = (order_value.indexOf("-") > -1) ?
> order_value : "-" + order_value;
Your ternary expression evaluates to order_value if it contains a '-'
character, and to '-' + order_value otherwise. This will result in a
value that always includes a '-' character. If you can safely assume
that '-' will always be the first character, you can do something like
var order_value = order_value.indexOf( '-' ) > -1 ?
order_value.substring( 1 ) : '-' + order_value
--
med vänlig hälsning
David J. Hamilton
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.