This is a wierd problem that I just encountered. Just to note what I am running, I am using Asp.Net and I have prototype as an embedded resource. (An embedded resource is just a way that Asp.Net can put the javascript into a .dll and then you access it through a unique url) This embedded resource is loaded in the head element, and is the first script loaded into the head element. Everything works on the first load of the page. Then I do a postback, (Asp.Net does a POST to the same url and then under the hood raises events and other things, but from an HTML perspective it is just the POST method) then the page is re-rendered back to the client, and that is when I get a JS error on line 3989. That seems to be the code for faking the DOMContentLoaded event for IE. The code is: 3988: document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>"); 3989: $("__onDOMContentLoaded").onreadystatechange = function() { The error I get is that $("__onDOMContentLoaded") is null. Going into a debugger it seems that the document.write from line 3988 did not actually add the script. document.scripts does not contain that script. After I click the ok on the error, it seems that at some point it does get added to the document.scripts collection. Anyone have any ideas as to why the script is not getting written in time for line 3989? Also why is it a document.write instead of a document.createElement? Wouldn''t that ensure that it is in the dom for the next line of code? Also I am posting this message here per the instructions that the Prototype Core list is not for help questions. (Of course this is not so much of a help question as much as an issue with prototype.js) Thanks in advance for any help in the matter. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---