Click to See Complete Forum and Search --> : Javascript help


Force
04-15-2003, 04:36 PM
:confused:

I have the following snippet of code, and for the life of me I can't get this to work. Can someone please take a look and tell me where I went wrong? It doesn't pop up on the page load. Thanks. It's been one of those days.

Mark

<head>
<title>Confirmation</title>

<script language="JavaScript">
function new()
{ window.open('test.cfm','myWindow','width=300,height=300,screenx=200,screeny=200,top=200,left=200,alw aysraised=yes');
}
</script>

</head>

<body onload="javascript:new()">

DrDaMour
04-15-2003, 04:40 PM
new is a keyword, you have to change the name of hte function to something else.

Force
04-15-2003, 04:46 PM
I changed the keyword new to newwindow. Still no luck on the window popping up. All of the other scripts work fine on my site. Thanks for the help.

DrDaMour
04-15-2003, 04:51 PM
<html>

<head>
this works for me, i'm using internet explorer

<title>Confirmation</title>

<script language="JavaScript">

function newwindow()
{
window.open('test. cfm','myWindow','width=300,height=300,screenx=200,screeny=200,top=200,left=200,alwaysraised=yes');
}
</script>

</head>

<body onload="javascript:newwindow()">



</body>


</html>