Re: Alternative to Using Onload Command?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: Alternative to Using Onload Command?

From: Evertjan. <exjxw.hannivoort@interxnl.net>
Date: Sat Jan 28 2006 - 20:03:58 CET

Vik Rubenfeld wrote on 28 jan 2006 in comp.lang.javascript:

> The onload command in the body tag is keeping the window.onload command
> from working. At this point EE doesn't let extensions modify the body
> tag.
>

=================================
<body onload='alert(2);'>

<script type="text/javascript">
 x = document.body.outerHTML.split('>')[0].split('=')[1]
 window.onload = function(){alert(1);eval(x)}
 alert(0);
</script>
=================================

returns alerts: 0 1 2

sorry for the evil eval() and outerHTML is IE only.

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Received on Tue Feb 7 21:25:55 2006