html and javascript..new guy needs help!

liunx

Guest
hey<br />
<br />
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<br />
<br />
<html><br />
<head><br />
<title></title><br />
<SCRIPT language="javascript"><br />
<!--<br />
<br />
function goNewWin() <br />
{<br />
<br />
window.open ('add.htm', 'newwindow', config='height=100,<br />
width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no,<br />
location=no, directories=no, status=no');<br />
<br />
<br />
}<br />
--><br />
</script> <br />
</head><br />
<body><br />
<CENTER><br />
<FORM><br />
<input type="button" VALUE="click me!" onClick="goNewWin()"><br />
</FORM><br />
</CENTER><br />
<br />
</body><br />
</html><br />
<br />
add.htm is in the same dir, and i bet its some small thing. it shows error on page in ie, and nothing happens<br />
please help!<!--content-->Remove the line-breaks from your script, so the the entire window.open code is on one line.<br />
<br />
window.open ('add.htm', 'newwindow', config='height=100, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');<!--content-->
 
Back
Top