Forum Moderators: open

Message Too Old, No Replies

window.onload

window.onload problem

         

anaconda

10:49 pm on Jan 14, 2004 (gmt 0)

10+ Year Member



I am having a problem with IE version 6.0.2800.1106

There is a java script in the html that my browser seems to ignore or rather my IE seems to igrnore the onload function.

The following script will not execute in my browser.

<head>
...
<script language="javascript">
function bustOut(){
var newWin = window.open("http://www.ssfcu.org", "subWindow","height=500,width=700,resizable=yes,scrollbars=yes");
}

</script>
</head>
<body onLoad="bustOut();">

Eat at Joe's

</body>
</html>

Same with a minor change.

It won't work if I set it up like this:

<head>
...
<script language="javascript">
function bustOut(){
var newWin = window.open("http://www.ssfcu.org", "subWindow","height=500,width=700,resizable=yes,scrollbars=yes");
}

window.onload = bustOut;
</script>
</head>
<body>

Eat at Joe's

</body>
</html>

It does work if I set it up like this, but I get error:

Not implemented.

<head>
...
<script language="javascript">
function bustOut(){
var newWin = window.open("http://www.ssfcu.org", "subWindow","height=500,width=700,resizable=yes,scrollbars=yes");
}

window.onload = bustOut();
</script>
</head>
<body>

Eat at Joe's

</body>
</html>

Can anyone help please?

Purple Martin

12:08 am on Jan 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'll ask two stupid questions, just in case ;-)
Does your browser have JavaScript enabled in the security settings?
Have you got an opening <html> tag at the top?

wcbzero

12:15 am on Jan 15, 2004 (gmt 0)

10+ Year Member



Also do you have any "pop-up blocker" stuff or anything like that (for example: webwasher)?

~Wcbzero

anaconda

5:00 pm on Jan 15, 2004 (gmt 0)

10+ Year Member



I do have an opening html head at the top and no I don't any kind of popup blocker.

anaconda

5:02 pm on Jan 15, 2004 (gmt 0)

10+ Year Member



I also verified that java scripting is enabled.

Purple Martin

9:41 pm on Jan 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I just copy'n'pasted your code into a blank document, and it works. I'm using IE 6.0.2800.1106 - the exact same version as you. So something wierd is going on - if you're absolutely sure you've got no popup software or spyware or other things on your system that could interfere with IE, then maybe it's time to reinstall IE.

anaconda

2:56 pm on Jan 16, 2004 (gmt 0)

10+ Year Member



Here is what I did. I went into control panel and opened the remove software folder. I then went to the windows software portion of it. I told it to remove Internet explorer. I rebooted and deleted all IE content that I could find and delete from disk. I then re-installed IE from CD> I rebooted and logged on as local administrator. I deleted my userid profile and user id. L logged off and logged back on as my usual id. I had to resetup everything. After all that I tried it again and bam, the browser does not seem to recognize the window.onload in the scripts. I also downloaded the Adware program and ran it against the disk and registry. It found a few text files but no executables. I had it delete the text files and rebooted and tried again. Same results. Any help here would be appreciated. Thanks for the help so far.