Hallo,
ich habe ein merkwürdiges Phänomen. Ich habe ein HTML-Dokument, welches sehr viel JS-Code besitzt. Wenn ich dieses dann offline teste, funktioniert es prima. Sobald ich es dann poste und teste, geht nichts, da der Code plötzlich völlig anderst ist. Was ist das????
Online-original Code:
Offline Code:
ich habe ein merkwürdiges Phänomen. Ich habe ein HTML-Dokument, welches sehr viel JS-Code besitzt. Wenn ich dieses dann offline teste, funktioniert es prima. Sobald ich es dann poste und teste, geht nichts, da der Code plötzlich völlig anderst ist. Was ist das????
Online-original Code:
PHP-Code:
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<Script LANGUAGE="JavaScript" TYPE="text/javascript">
function disableRightClick(e)
{
var message = "Right click disabled";
if(!document.rightClickDisabled)
{
if(document.layers)
{
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown = disableRightClick;
}
else document.oncontextmenu = disableRightClick;
return document.rightClickDisabled = true;
}
if(document.layers || (document.getElementById && !document.all))
{
if (e.which==2||e.which==3)
{
return false;
}
}
else
{
return false;
}
}
disableRightClick();
function isDefined(property)
{
return (typeof property != 'undefined');
}
var flashVersion = 0;
function getFlashVersion()
{
var latestFlashVersion = 8;
var agent = navigator.userAgent.toLowerCase();
if (agent.indexOf("mozilla/3") != -1 && agent.indexOf("msie") == -1)
{
flashVersion = 0;
}
if (navigator.plugins != null && navigator.plugins.length > 0)
{
var flashPlugin = navigator.plugins['Shockwave Flash'];
if (typeof flashPlugin == 'object')
{
for (var i = latestFlashVersion; i >= 3; i--)
{
if (flashPlugin.description.indexOf(i + '.') != -1)
{
flashVersion = i;
break;
}
}
}
}
else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1)
{
var doc = '<scr' + 'ipt language="VBScript"\> \n';
doc += 'On Error Resume Next \n';
doc += 'Dim obFlash \n';
doc += 'For i = ' + latestFlashVersion + ' To 3 Step -1 \n';
doc += ' Set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash." & i) \n';
doc += ' If IsObject(obFlash) Then \n';
doc += ' flashVersion = i \n';
doc += ' Exit For \n';
doc += ' End If \n';
doc += 'Next \n';
doc += '</scr' + 'ipt\> \n';
document.write(doc);
}
else if (agent.indexOf("webtv/2.5") != -1) flashVersion = 3;
else if (agent.indexOf("webtv") != -1) flashVersion = 2;
else
{
flashVersion = flashVersion_DONTKNOW;
}
return flashVersion;
}
flashVersion_DONTKNOW = -1;
var requiredVersion = 6;
var flashVersion = getFlashVersion();
if (flashVersion >= requiredVersion)
{
document.write('<div align="center"> ');
document.write('<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"><tr>');
document.write('<td><div align="center">');
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="800" height="400">');
document.write('<param name="movie" value="menu.swf"><param name="quality" value="high"><param name="BGCOLOR" value="#CD3400"><param name="menu" value="false">');
document.write('<embed src="menu.swf" width="800" height="400" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#CD3400" menu="false"></embed></object>');
document.write('</div></td></tr></table></div>');
}
else
{
document.write('<center><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">');
document.write('<tr><td><div align="center"> <table width="800" height="400" border="0" cellpadding="0" cellspacing="0"><tr>');
document.write('<td background="backgroundlogo.jpg"><div align="center">');
document.write('<p align="center"> </p><p align="center"> </p><p align="center"> </p>');
document.write('<p align="center"> </p><p align="center"> </p><p align="center"> </p>');
document.write('<p align="center"> </p<p align="center">');
document.write('<font size="1" face="Verdana, Arial, Helvetica, sans-serif">MACROMEDIA FLASH DETECTION</font></p>');
document.write('<p align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Leider kein Flash MX plugin gefunden! </font></p>');
document.write('<p align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Bitte updaten auf Flash 6 (MX)!</font></p>');
document.write('<p><a href="http://www.macromedia.com/shockwave/download/alternates" target="_blank"><img src="get_flashplayer.gif" width="88" height="31" border="0"></a></p>');
document.write('</div></td></tr></table><p align="center"> </p>');
document.write('</div></td></tr></table></center>');
}
</script>
<NOSCRIPT>
<center><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td><div align="center"> <table width="800" height="400" border="0" cellpadding="0" cellspacing="0"><tr>
<td background="backgroundlogo.jpg">
<div align="center"><p align="center"> </p><p align="center"> </p><p align="center"> </p>
<p align="center"> </p><p align="center"> </p><p align="center"> </p><p align="center"> </p>
<p align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">JAVA SCRIPT </font></p>
<p align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Diese Seite setzt JAVA SCRIPT voraus!</font></p>
<p align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Bitte aktivieren Sie in Ihrem Browser JAVA SCRIPT!</font></p>
<p> </p></div></td></tr></table><p align="center"> </p> </div></td></tr></table></center>
</NOSCRIPT>
</HEAD>
<body bgcolor="#CD3400" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
</body>
</HTML>
Offline Code:
PHP-Code:
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
function SymError()
{
return true;
}
window.onerror = SymError;
var SymRealWinOpen = window.open;
function SymWinOpen(url, name, attributes)
{
return (new Object());
}
window.open = SymWinOpen;
//-->
</script>
<Script LANGUAGE="JavaScript" TYPE="text/javascript"> </script>
<NOSCRIPT>
<center><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td><div align="center"> <table width="800" height="400" border="0" cellpadding="0" cellspacing="0"><tr>
<td background="backgroundlogo.jpg">
<div align="center"><p align="center"> </p><p align="center"> </p><p align="center"> </p>
<p align="center"> </p><p align="center"> </p><p align="center"> </p><p align="center"> </p>
<p align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">JAVA SCRIPT </font></p>
<p align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Diese Seite setzt JAVA SCRIPT voraus!</font></p>
<p align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Bitte aktivieren Sie in Ihrem Browser JAVA SCRIPT!</font></p>
<p> </p></div></td></tr></table><p align="center"> </p> </div></td></tr></table></center>
</NOSCRIPT>
</HEAD>
<body bgcolor="#CD3400" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
</body>
<script language="JavaScript">
<!--
window.open = SymRealWinOpen;
//-->
</script>
</HTML>
Kommentar