Sure, try this

// ?>
echo('
<script language="JavaScript">
<!-- This script controls the rollovers in the menu area
if (document.images) {
');
// <?

Make sure there are no blanks _anywhere_ (even in includes) before the header code

HTH


Andrew Austin wrote:

> Warning: Cannot add header information - headers already sent by (output started
> I understand that one of the reasons for this erro message is if their is a trailing 
>space after a ?>. I have some PHP code which produces javascript rollover code. Above 
>this there are a few includes referencing database and authorization files. Then I 
>there is this peice of code
>
> finish of start code
> <?
>         $page=getenv(SCRIPT_NAME) ;
>         $page = split( "/", $page, 3 );
>         $page = "." . $page[4];
>         $page = split( "\.", $page, 2);
>         $page = $page[1];
> ?>
> <script language="JavaScript">
> <!-- This script controls the rollovers in the menu area
> if (document.images) {
> <?
>
> etc etc start of next code
>
>
> It is this break which produces the error code. Is it possible to place the <script 
>language="JavaScript"> into a piece of php code to fix this error? Or is there 
>another method?
>
> Thanks in advance.
>
> Andrew
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to