You are right, there is a reason I am echoing it in php, it is one result of an if statement.
<?php if (basename($PHP_SELF) == "index.php") { echo "<body onload=\"start();initialize();onoff('mainmenu',section,'on')\" onresize=\"window.location.reload(false)\" topmargin=\"1\" bottommargin=\"0\" leftmargin=\"0\" rightmargin=\"0\">"; } else { echo "<body onload=\"initialize();onoff('mainmenu',section,'on')\" onresize=\"window.location.reload(false)\" topmargin=\"1\" bottommargin=\"0\" leftmargin=\"0\" rightmargin=\"0\">"; } ?> I tried echoing with single quotes - no change. So I compared the view source of the double quoted php generated page and of the html generated page - they are identical: <body onload="start();initialize();onoff('mainmenu',section,'on')" onresize="window.location.reload(false)" topmargin="1" bottommargin="0" leftmargin="0" rightmargin="0"> So I no longer think php is parsing the javascript incorrectly - the same error happens if I put the 'onoff()' function directly in html and only put the 'start()' function in the if statement. The weird thing is that the php page still gives the error and the html does not. Anyway, I thought I would see if there were any more ideas as to what I am doing wrong. Thanks for the help, Aaron On 11/13/02 12:50 AM, "@ Edwin" <[EMAIL PROTECTED]> wrote: > echo '<body onload="start();initialize();onoff(\'mainmenu\',section,\'on\')" > onresize="window.location.reload(false)" topmargin="1" bottommargin="0" > leftmargin="0" rightmargin="0">'; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php