php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11387 compatibility with MM Dreamweaver Javascript ?
Submitted: 2001-06-10 15:38 UTC Modified: 2001-06-12 01:17 UTC
From: mandel at loststory dot net Assigned:
Status: Closed Package: Session related
PHP Version: 4.0.4 OS: Win2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mandel at loststory dot net
New email:
PHP Version: OS:

 

 [2001-06-10 15:38 UTC] 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 ...
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-12 01:17 UTC] sniper@php.net
Update your PHP. This should be fixed in PHP 4.0.5.

--Jani

 [2001-06-12 01:17 UTC] sniper@php.net
Update your PHP. This should be fixed in PHP 4.0.5.

--Jani

 [2001-06-12 01:17 UTC] sniper@php.net
Update your PHP. This should be fixed in PHP 4.0.5.

--Jani

 [2001-06-12 01:17 UTC] sniper@php.net
Update your PHP. This should be fixed in PHP 4.0.5.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 11:01:31 2024 UTC