Hello, I’m trying to set a variable which a remote page can access. I can do this, but I need to set this variable inside “[B]window.onload = functio(){
[code]//—————————————————————- index.html
<script type=”text/javascript”>
window.wow = ‘lmao’;
window.onload = function(){
window.lol = ‘omg’;
}
</script>
<iframe width=”200″ height=”200″ src=”frame.html”></iframe>
//—————————————————————- frame.html
<script type=”text/javascript”>
document.write(parent.wow); // outputs ‘lmao’
document.write(parent.lol); // outputs ‘undefined’
</script>
Any ideas why this might be happening?