#11387 [Com]: compatibility with MM Dreamweaver Javascript ?

From: Date: Mon, 25 Aug 2003 14:54:26 +0000
Subject: #11387 [Com]: compatibility with MM Dreamweaver Javascript ?
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-46580@lists.php.net to get a copy of this message
ID: 11387 Comment by: scherry at defcode dot com Reported By: mandel at loststory dot net Status: Closed Bug Type: *Session related Operating System: Win2000 PHP Version: 4.0.4 New Comment: Using version 4.1.2: I'm having this same problem with onLoad events in the body tag. In fact anything after "<body" gets put at the end of the document, whether that be a single ">" or all onLoad event (or any other js for that matter. This work-around does get rid of the error, so i'm using it for now. Any suggestions? Previous Comments: ------------------------------------------------------------------------ [2001-06-12 01:17:25] sniper@php.net Update your PHP. This should be fixed in PHP 4.0.5. --Jani ------------------------------------------------------------------------ [2001-06-12 01:17:17] sniper@php.net Update your PHP. This should be fixed in PHP 4.0.5. --Jani ------------------------------------------------------------------------ [2001-06-12 01:17:13] sniper@php.net Update your PHP. This should be fixed in PHP 4.0.5. --Jani ------------------------------------------------------------------------ [2001-06-12 01:17:07] sniper@php.net Update your PHP. This should be fixed in PHP 4.0.5. --Jani ------------------------------------------------------------------------ [2001-06-10 15:38:39] mandel at loststory dot net The Javascript in bug.php is generated by MM Dreamveaver 4 Ultradev. A Javascript error occurs if bug is launched directly (very first session_start()) and not if I use good.php ... bug.php ----------------------- <? session_start(); ?> <html> <head> <title>php bug</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.0 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && document.getElementById) x=document.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> </head> <body bgcolor="#FFFFFF" text="#000000" onLoad="MM_preloadImages('puce_.gif')"> Here is a simple rollover image. Javascript by Dreamweaver Ultradev 4:<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','puce_.gif',1)"><img name="Image1" border="0" src="puce.gif" width="28" height="28"></a> </body> </html> good.php ---------------------- <? session_start(); // so that the first session_start() is not in the same page as Javascript ! Header("Location:bug.php"); // will run right ... ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=11387&edit=1

« previous php.bugs (#46580) next »