hallo leute,
ich habe ein kleines problem mit meinen gemalten bildern, die auf meine hp sollen.
die bilder sollen von der gallarie-seite aus (per klick auf das gewünschte bild) in einem neuen fenster geöffnet werden.
der link soll sich also in einem neuen fenster öffnen, das sich möglichst an die grösse des gelinkten bildes anpasst.
ausserdem möchte ich die rechte maustaste bei dem popup deaktivieren, damit sich das bild nicht kopieren werden kann... sowie sämtliche leisten ausblenden.
so, jetzt habe ich es mit scripten versuchet und es funzt auch alles wunderbar... jedenfalls bei mir auf dem rechen. wenn ich die seite komplett hochlade, läuft das aber nicht mehr so dolle. im net (server Strato) funzt der link nicht mehr und ich kann die thumbnails erst garnicht im popup öffnen.
ich habe hier mal das script der gallerie:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title>:::: Willkommen ::::</title>
<link href="std.css" rel="stylesheet" media="screen">
<style type="text/css" media="screen"><!--
#Ebene1 { visibility: visible; display: block; position: absolute; top: 15px; left: 0; width: 230px; height: 19px }
--></style>
<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 type="text/javascript" src="../GeneratedItems/CSScriptLib.js"></script>
<script type="text/javascript"><!--
CSInit[CSInit.length] = new Array(frameP,/*URL*/ '../index.html','_top');
CSAct[/*CMP*/ 'A37BB3317'] = new Array(OUTOpenImageWindow,/*URL*/ '../pics/BILD1.jpg','pics',0,0,true,true,true,true,true,true,true,'000000','BILD1',0,/*URL*/ '#none',false,true,true);
// --></script>
<base target="_self">
</head>
<body oncontextmenu="return false" onselectstart="return false" ondragstart="return false" onload="CSScriptInit();" bgcolor="#66ccff" text="black" link="#000000" vlink="#000000" alink="#000000" leftmargin="0" marginheight="10" marginwidth="0" topmargin="10">
<div id="Ebene1">
<div class="d11px">
STARTSEITE ::: BILDER/ANGEBOT</div>
</div>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="28"></td>
</tr>
<tr>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right" valign="middle">weiter ::: zurück</td>
</tr>
</table>
<table border="0" cellspacing="2" cellpadding="3">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="d11px" align="center" bgcolor="#FFC140">130</td>
</tr>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right" valign="middle">weiter ::: zurück</td>
</tr>
<tr>
<td align="center" valign="middle">
hier gehts zur Bestellung</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</body>
</html>
<script language="JavaScript">
<!--
var SymRealOnLoad;
var SymRealOnUnload;
function SymOnUnload()
{
window.open = SymWinOpen;
if(SymRealOnUnload != null)
SymRealOnUnload();
}
function SymOnLoad()
{
if(SymRealOnLoad != null)
SymRealOnLoad();
window.open = SymRealWinOpen;
SymRealOnUnload = window.onunload;
window.onunload = SymOnUnload;
}
SymRealOnLoad = window.onload;
window.onload = SymOnLoad;
//-->
</script>
so das ist also das script der gallerie-seite.
ausserdem habe ich noch eine csscriptlip.js angelegt:
function CSScriptInit() {
if(typeof(skipPage) != "undefined") { if(skipPage) return; }
idxArray = new Array;
for(var i=0;i<CSInit.length;i++)
idxArray[i] = i;
CSAction2(CSInit, idxArray);
}
CSInit = new Array;
CSExit = new Array;
CSStopExecution=false;
function CSAction(array) {return CSAction2(CSAct, array);}
function CSAction2(fct, array) {
var result;
for (var i=0;i<array.length;i++) {
if(CSStopExecution) return false;
var aa = fct[array[i]];
if (aa == null) return false;
var ta = new Array;
for(var j=1;j<aa.length;j++) {
if((aa[j]!=null)&&(typeof(aa[j])=="object")&&(aa[j].length==2)){
if(aa[j][0]=="VAR"){ta[j]=CSStateArray[aa[j][1]];}
else{if(aa[j][0]=="ACT"){ta[j]=CSAction(new Array(new String(aa[j][1])));}
else ta[j]=aa[j];}
} else ta[j]=aa[j];
}
result=aa[0](ta);
}
return result;
}
CSAct = new Object;
function CSClickReturn () {
var bAgent = window.navigator.userAgent;
var bAppName = window.navigator.appName;
if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
return true; /* dont follow link */
else return false; /* dont follow link */
}
/* -- Action Functions */
function frameP(action) {
if(parent.frames.length==0) {
var fileName=window.location.href.substring(window.location.href.lastIndexOf("/")+1,window.location.href.length);
window.location.href=action[1]+"?"+action[2]+"="+fileName;
} else {
if(top.location.search!="") {
var sFrame=top.location.search.substring(1,top.location.search.indexOf("="));
if(name==sFrame) {
var sName=top.location.search.substring(top.location.search.indexOf("=")+1,top.location.search.length);
var fileName=window.location.href.substring(window.location.href.lastIndexOf("/")+1,window.location.href.length);
if(fileName!=sName) {
location=sName;
}
}
}
}
}
function CSGoBack1() { history.back() }
// OUT Delay Action Action 1.0
// Script copyright 2000, OUT Media Design GmbH. All rights reserved.
function OUTdelayAction(action){return setTimeout("CSAction(new Array('"+action[1]+"'))",action[2]);}
// OUT Open Image Window Action v1.2.6
// Script copyright 1999, 2000 OUT Media Design GmbH. All rights reserved.
function OUTOpenImageWindow(action) {
var imgWinW = action[3];
var imgWinH = action[4];
var bgImg = action[16] ? ' BACKGROUND="'+action[15]+'" ' : '';
var bVers=window.navigator.appVersion.substring(0,1);
var isMac = window.navigator.userAgent.indexOf("Mac") >= 0;
var isNN = window.navigator.appName.indexOf("Netscape")>=0;
var isIE = window.navigator.appName.indexOf("Explorer")>=0;
var wOffset = (bVers<4 && isNN) ? 9 : action[14];
imgWinW += 2*wOffset;
imgWinH += 2*wOffset;
var wf = "";
wf = wf + "width=" + imgWinW;
wf = wf + ",height=" + imgWinH;
wf = wf + ",left=10";
wf = wf + ",top=10";
wf = wf + ",resizable=" + (action[5] ? "no" : "yes");
wf = wf + ",scrollbars=" + (action[6] ? "no" : "yes");
wf = wf + ",menubar=" + (action[7] ? "no" : "yes");
wf = wf + ",toolbar=" + (action[8] ? "no" : "yes");
wf = wf + ",directories=" + (action[9] ? "no" : "yes");
wf = wf + ",location=" + (action[10] ? "no" : "yes");
wf = wf + ",status=" + (action[11] ? "no" : "yes");
var newImgWin = window.open("",action[2],wf);
newImgWin.saveResizable = !action[5];
newImgWin.document.writeln('<HTML><HEAD><TITLE>'+action[13]+'</TITLE><meta http-equiv="imagetoolbar" content="no"></HEAD>');
newImgWin.document.writeln('<BODY onclick="javascript:self.close()" oncontextmenu="return false" onselectstart="return false" ondragstart="return false" BGCOLOR="'+action[12]+'"'+bgImg+' MARGINWIDTH="'+action[14]+'" MARGINHEIGHT="'+action[14]+'" LEFTMARGIN="'+action[14]+'" TOPMARGIN="'+action[14]+'">');
newImgWin.document.write('<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%" HEIGHT="100%"><TR><TD VALIGN="middle" ALIGN="center">=4) newImgWin.document.write(' ONLOAD="var imgWinW=this.width+'+2*wOffset+';var imgWinH=this.height+'+2*wOffset+';if(window.setResizable) window.setResizable(true);window.resizeTo(imgWinW, imgWinH);if (window.setResizable) window.setResizable(window.saveResizable);if(window.document.body && (window.document.body.clientWidth!=imgWinW window.document.body.clientHeight!=imgWinH)) { window.resizeTo(2*imgWinW-window.document.body.clientWidth,2*imgWinH-window.document.body.clientHeight);}"');
newImgWin.document.writeln('></TD></TR></TABLE>');
newImgWin.document.writeln('</BODY></HTML>');
newImgWin.document.close();
if(bVers>=4 && !action[17]) { //do chrome compensation now
if (isNN && newImgWin.setResizable) newImgWin.setResizable(true);
if (!(isIE && isMac)) newImgWin.resizeTo(imgWinW,imgWinH);
if (isNN && newImgWin.setResizable) newImgWin.setResizable(!action[5]);
if(isIE && !isMac && (newImgWin.document.body.clientWidth!=imgWinW newImgWin.document.body.clientHeight!=imgWinH)) newImgWin.resizeTo(2*imgWinW-newImgWin.document.body.clientWidth,2*imgWinH-newImgWin.document.body.clientHeight);
}
if(action[18] && bVers>=4 && !(isMac && isIE && bVers<5)) newImgWin.focus();
}
function CSSlideNewWindow(action) {
var wh = ""
if (action[7] action[8] action[9] == true) wh=action[4]-125
else wh = action[4]
var wf = "";
wf = wf + "width=" + action[3];
wf = wf + ",height=" + wh;
wf = wf + ",resizable=" + (action[5] ? "yes" : "no");
wf = wf + ",scrollbars=" + (action[6] ? "yes" : "no");
wf = wf + ",menubar=" + (action[7] ? "yes" : "no");
wf = wf + ",toolbar=" + (action[8] ? "yes" : "no");
wf = wf + ",directories=" + (action[9] ? "yes" : "no");
wf = wf + ",location=" + (action[10] ? "yes" : "no");
wf = wf + ",status=" + (action[11] ? "yes" : "no");
if(navigator.appVersion.charAt(0) >=4) {
var sw=screen.width-20;
var sh=screen.height;
var newwidth=action[3];
var newheight=action[4];
var positionleft=(sw-newwidth)/2;
var positiontop=""
if (action[7] action[8] action[9] == true) positiontop=(sh-newheight)/3;
positiontop=(sh-newheight)/2.5;
}
newwindow=window.open(action[1],action[2],wf);
newwindow.focus()
if(navigator.appVersion.charAt(0) >=4) {
for(width1 = 1 ; width1 < positionleft ; width1 = width1 + 10)
newwindow.moveTo(width1,positiontop)
}
}
kann mir vielleicht jemand helfen und sagen was ich falsch mache...?
vielen lieben dank schon mal vorab.
will