I'm a complete Javascript n00b, using a snippet I found on the web.
I'll probably be buying a Javascript book. What's the authoritative
on-line resource for Javascript, like php.net is for PHP? I'm a
relative PHP n00b.
This code works fine on Opera & Mozilla under Linux, but fails for both
Netscape & IE under Windows:
<script language="JavaScript">
<!--
function smallWindow(URL, X, Y, Title)
{
var win = window.open(URL, Title,
'width='+X+',height='+Y+',resizable=1,scrollbars=1 ');
}
// -->
</script>
<form name="form1" method="post" action="">
<html>
<head>
etc.
a ton of PHP code echoing HTML, including:
echo '<a href="javascript:onclick=smallWindow(\'unitconvert er.php\',
\'250\', \'150\', \'Convert Units\');">';
echo 'Unit Conversion Calculator';
echo '</a>';
I can open unitconverter.php stand-alone, as well as via a simple
<a href="unitconverter.php" target="new window">.
It's only when I go through Javascript that it fails with nothing more
than a friendly "Error in page" message from IE, while Netscape is mute.
--
Lynn Wallace http://www.xmission.com/~lawall
"I'm not proud. We really haven't done everything we could to protect
our customers. Our products just aren't engineered for security."
--Microsoft VP in charge of Windows OS Development, Brian Valentine.