Chris S a écrit :
> 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.

FWIW, IE will use a large set of sources when resolving 
document.getElementById (which is at the heart of $()), and your 
assigning the result to a same-named global variable may indeed confuse 
him, although I find it a bit weird.

At any rate, you should indeed always declare your local variables as… 
local, thanks to "var".  Scope pollution can be a VERY nasty thing, for 
instance when function A loops over calls to function B which has a 
same-name-index loop in it ;-)

-- 
Christophe Porteneuve aka TDD
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
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 [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-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to