The following function worked fine in FF but not in IE - I'd get an
object Error (though I'm still not quite sure why):

function updateCartTotalPrice(element_id) {
    total_price_td = $('total_price_td');
    total_price = getPrice(total_price_td);
    this_price = getPrice($(element_id));
    updated_price = total_price - this_price;
    updated_price = updated_price.toCurrency();
    total_price_td.update(updated_price);
}

I thought for about an hour the offending code was the last line
(the .update), because the total_price_td is inside of a table. I had
heard that ie doesn't play nice with innerHTML. So I tried using
replace, and a couple other things but still no dice. Well, it turns
out the problem was actually the first line. I guess because
total_price_td is the id of an element, IE choked. I'm not sure why
though - could someone explain that? Anyway to fix it I declared
total_price_td with var like I should have in the first place. Hope
this helps someone save an hour (or 3) of frustration.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to