Click to See Complete Forum and Search --> : html and javascript..new guy needs help!


acl
07-21-2004, 11:50 AM
hey

i am trying to create a page that opens up another htm in a new window when a button is clicked..heres what i have

<html>
<head>
<title></title>
<SCRIPT language="javascript">
<!--

function goNewWin()
{

window.open ('add.htm', 'newwindow', config='height=100,
width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no,
location=no, directories=no, status=no');


}
-->
</script>
</head>
<body>
<CENTER>
<FORM>
<input type="button" VALUE="click me!" onClick="goNewWin()">
</FORM>
</CENTER>

</body>
</html>

add.htm is in the same dir, and i bet its some small thing. it shows error on page in ie, and nothing happens
please help!

Paul Jr
07-21-2004, 12:02 PM
Remove the line-breaks from your script, so the the entire window.open code is on one line.

window.open ('add.htm', 'newwindow', config='height=100, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');