So... I might have found the oddest bug ever. I''ve put the specifics up on my site at http://www.jonhartmann.com/programming/index.cfm/2008/4/7/Prototypejs-on-IE-smashed-by-idtblStudents, but the gist of it is that Class.create() will throw an error in IE if it is proceeded by a DIV with id equal to ''tblStudents''. It will not error with ''tblstudents'', or ''tblStudent, or ''tblStudentz''. If a DIV with that ID appears after Class.create(), the code will execute without error. As I say in my post... I''m baffled. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
before your "''tblStudent" class declaration insert "alert(tblStudent === $(''''tblStudent''))" this should alert true. IE will auto assign global variables to match the elements id name. To avoid this use "var tblStudent" or window.tblStudent or a different variable name. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
* auto assign global variables is kinda wrong because window.tblStudent === undefined but you get the idea, it uses the id as a reference in the code so element with id="foo" you can access in your code: foo === the element with id "foo". --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Ok, so the idea is that when I try and set tblStudents = new DisplayTable, IE already has a window.tblStudent that it doesn''t want to mess with, so it throws an error? Why doesn''t it just set tblStudent equal to the new value? Pointless question I guess... Thank you for the help... I had ever run into a naming conflict quite like that before. The simplist solution then is to name it differently? On Apr 7, 6:05 pm, jdalton <John.David.Dal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> before your "''tblStudent" class declaration insert "alert(tblStudent > === $(''''tblStudent''))" this should alert true. > IE will auto assign global variables to match the elements id name. To > avoid this use "var tblStudent" or window.tblStudent or a different > variable name.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
It doesn''t make a window.tblStudent name, but it does reference the element by id via simply using the id as a variable. You can avodi this by keeping your id''s different from your variables or by using: var tblStudent = new DisplayTable(); //notice the "var" I hope this helps :) - JDD --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Thank you. Jon On Apr 7, 10:53 pm, jdalton <John.David.Dal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> It doesn''t make a window.tblStudent name, but it does reference the > element by id via simply using the id as a variable. > You can avodi this by keeping your id''s different from your variables > or by using: > var tblStudent = new DisplayTable(); //notice the "var" > > I hope this helps :) > - JDD--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---