moinsen ich habe eine html seite gebaut aber die slideshow die auf java script basiert wird nicht in jeden browser richtieg angezeigt.
java script:
Einmall der komplette HTML code:
ichwürde mich um eine hilfestellung sehr freuen
lenny
java script:
Code:
leftdisabled = true
rightdisabled = true
widthLength = 640
function fp_ie4() {
var nav = navigator.appVersion.indexOf("MSIE");
return (nav>0) && (parseInt(navigator.appVersion.substring(nav+5, nav+6)) >= 4);
}
function fp_ns6() {
return ((navigator.appName == "Netscape") &&
(parseInt(navigator.appVersion.substring(0, 1)) >= 5))
}
function fp_ShowImg(src, sWidth, sHeight, sID, iIndex)
{
var el = document.images["fpGalleryMainImg_" + sID];
if (el) {
if(fp_ie4()) {
el.style.visiblity = "hidden";
el.src = src.getAttribute ? src.getAttribute("lowsrc") : src.lowsrc;
el.width = sWidth;
el.height = sHeight;
var caption = document.all["fpGalleryCaptions_" + sID].all.tags("div")
var sCaptionTxt;
var sCaptionHTML;
if (caption && caption[iIndex]) {
sCaptionTxt = caption[iIndex].innerText
sCaptionHTML = caption[iIndex].innerHTML
} else {
sCaptionTxt = "";
sCaptionHTML = "";
}
el.title = sCaptionTxt;
el.style.visiblity = "visible";
var el = document.all["fpGalleryCaptionCell_" + sID];
if (el) {
el.innerHTML = sCaptionHTML;
}
var el = document.all["fpGalleryDescCell_" + sID];
if (el) {
var sDesc = document.all["fpGalleryDescriptions_" + sID].all.tags("div")
el.innerHTML = sDesc && sDesc[iIndex]?sDesc[iIndex].innerHTML:"";
}
} else {
el.src = src.getAttribute ? src.getAttribute("lowsrc") : src.lowsrc
el.style.width = sWidth
el.style.height = sHeight
caption = document.getElementById("fpGalleryCaptions_" + sID).getElementsByTagName("div")
if (caption && caption[iIndex]) {
sCaptionTxt = caption[iIndex].innerText
sCaptionHTML = caption[iIndex].innerHTML
} else {
sCaptionTxt = ""
sCaptionHTML = ""
}
el.title = sCaptionTxt
var e = document.getElementById("fpGalleryCaptionCell_" + sID)
if (e) {
e.innerHTML = sCaptionHTML
}
var e = document.getElementById("fpGalleryDescCell_" + sID)
if (e) {
var sDesc = document.getElementById("fpGalleryDescriptions_" + sID).getElementsByTagName("div")
e.innerHTML = sDesc[iIndex]?sDesc[iIndex].innerHTML:""
}
}
}
}
function fp_ScrollLeft(sID) {
var el = document.all["fpGalleryListCell_" + sID];
if (el && fp_ie4()) {
var coll = el.children.tags("A");
var count = 20;
if (coll) {
for (i=1;i<coll.length;i++) {
if (coll(i).style.display != "none") {
coll(i-1).style.display = "inline";
break;
}
}
for (i=0;i<coll.length;i++) {
if (coll(i).style.display != "none") {
var images = coll[i].children.tags("img");
count = count + 20 + images[0].width;
if (count > widthLength)
coll(i).style.display = "none";
}
}
if ((el.scrollWidth - 5) >= el.clientWidth) {
var btn = document.all["fpGalleryRightBtn_" + sID]
if (btn && rightdisabled) {
rightdisabled = false;
te = btn.src
btn.src = btn.getAttribute ? btn.getAttribute("lowsrc") : btn.lowsrc
btn.lowsrc = te
}
}
if (coll(0).style.display != "none") {
var btn = document.all["fpGalleryLeftBtn_" + sID]
if (btn && !leftdisabled) {
leftdisabled = true;
te = btn.src
btn.src = btn.getAttribute ? btn.getAttribute("lowsrc") : btn.lowsrc
btn.lowsrc = te
}
}
}
}
}
function fp_ScrollRight(sID) {
var el = document.all["fpGalleryListCell_" + sID];
if (el && fp_ie4()) {
if (!rightdisabled)
{
var coll = el.children.tags("A");
if (coll) {
var state = 0;
var count = 20;
for (i=0;i<coll.length;i++) {
if (state == 0)
{
if (coll(i).style.display != "none") {
coll(i).style.display = "none";
state = 1;
}
}
else{
var images = coll[i].children.tags("img");
count = count + 20 + images[0].width;
if (count <= widthLength)
coll(i).style.display = "inline";
else
coll(i).style.display = "none";
}
}
}
var btn = document.all["fpGalleryRightBtn_" + sID];
if (btn && coll(coll.length - 1).style.display != "none") {
rightdisabled = true
te = btn.src
btn.src = btn.getAttribute ? btn.getAttribute("lowsrc") : btn.lowsrc
btn.lowsrc = te
}
var btn = document.all["fpGalleryLeftBtn_" + sID];
if (btn && leftdisabled) {
te = btn.src
btn.src = btn.getAttribute ? btn.getAttribute("lowsrc") : btn.lowsrc
btn.lowsrc = te
leftdisabled = false
}
}
}
}
Einmall der komplette HTML code:
HTML:
<html
<head>
<title>©2009 All rights Reserved</title>
<link rel="shortcut icon" href=favicon.ico type="image/x-icon">
<link rel="icon" href=favicon.ico type="image/x-icon">
</head>
<body bgcolor="#000000" text="#ff9900" vlink="#FF0066" %;>
<table border="5" style="width: 100%; height: 50px;">
<tr>
<td align="center" valign="middle" width="100%"><b><font size="6">LALALALALALALALAT</font></b></td>
</tr>
</table>
<br>
<table border="5" style="width: 100%; height: 500px;">
<tr>
<td valign="top" width="50%">
</td>
<td valign="top"50%">
<table border="1" width="100%">
<tr>
<td colspan="2">
<p align="center"><b>daten</b></td>
</td>
</tr>
<tr>
<td width="50%">
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
7</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td colspan="2">
<p align="center"><b>Crew</b></td>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
n</td>
<td>
</td>
</tr>
<tr>
<td>
Musik</td>
<td>
</td>
</tr>
<tr>
<td colspan="2">
<p align="center"><b>Besetzung</b></td>
</tr>
<tr>
<td>
Cherry Darling</td>
<td>
</td>
</tr>
<tr>
<td>
El Wray</td>
<td>
</td>
</tr>
<tr>
<td>
Dr. Dakota Mc Graw</td>
<td>
</td>
</tr>
<tr>
<td>
Dr. William Block</td>
<td>
</td>
</tr>
<tr>
<td>
Sheriff Hague</td>
<td>
</td>
</tr>
<tr>
<td>
J.T. Haugue</td>
<td>
</td>
</tr>
<tr>
<td>
Lt. Muldoon</td>
<td>
</td>
</tr>
<tr>
<td>
Abby</td>
<td>
</td>
</tr>
<tr>
<td>
Tony Block</td>
<td>
</td>
</tr>
<tr>
<td>
Louis</td>
<td>
</td>
</tr>
<tr>
<td>
Tammy Visan</td>
<td>
</td>
</tr>
<tr>
<td>
Joe</td>
<td>
</td>
</tr>
</table>
<p align="left"><br>
</td>
</tr>
</table>
<br>
<table border="5" style="width: 100%; height: 100%;">
<tr>
<td valign="top" width="100%">
<div align="center">
<center>
<layer visibility="hide">
<div style="display:none;" id="fpGalleryCaptions_7894">
<div></div><div></div><div></div><div></div><div></div><div></div><div></div></div>
<div style="display:none;" id="fpGalleryDescriptions_7894">
<div></div><div></div><div></div><div></div><div></div><div></div><div></div></div>
</layer>
<script language="javascript">
leftdisabled = true
rightdisabled = true
widthLength = 640
function fp_ie4() {
var nav = navigator.appVersion.indexOf("MSIE");
return (nav>0) && (parseInt(navigator.appVersion.substring(nav+5, nav+6)) >= 4);
}
function fp_ns6() {
return ((navigator.appName == "Netscape") &&
(parseInt(navigator.appVersion.substring(0, 1)) >= 5))
}
function fp_ShowImg(src, sWidth, sHeight, sID, iIndex)
{
var el = document.images["fpGalleryMainImg_" + sID];
if (el) {
if(fp_ie4()) {
el.style.visiblity = "hidden";
el.src = src.getAttribute ? src.getAttribute("lowsrc") : src.lowsrc;
el.width = sWidth;
el.height = sHeight;
var caption = document.all["fpGalleryCaptions_" + sID].all.tags("div")
var sCaptionTxt;
var sCaptionHTML;
if (caption && caption[iIndex]) {
sCaptionTxt = caption[iIndex].innerText
sCaptionHTML = caption[iIndex].innerHTML
} else {
sCaptionTxt = "";
sCaptionHTML = "";
}
el.title = sCaptionTxt;
el.style.visiblity = "visible";
var el = document.all["fpGalleryCaptionCell_" + sID];
if (el) {
el.innerHTML = sCaptionHTML;
}
var el = document.all["fpGalleryDescCell_" + sID];
if (el) {
var sDesc = document.all["fpGalleryDescriptions_" + sID].all.tags("div")
el.innerHTML = sDesc && sDesc[iIndex]?sDesc[iIndex].innerHTML:"";
}
} else {
el.src = src.getAttribute ? src.getAttribute("lowsrc") : src.lowsrc
el.style.width = sWidth
el.style.height = sHeight
caption = document.getElementById("fpGalleryCaptions_" + sID).getElementsByTagName("div")
if (caption && caption[iIndex]) {
sCaptionTxt = caption[iIndex].innerText
sCaptionHTML = caption[iIndex].innerHTML
} else {
sCaptionTxt = ""
sCaptionHTML = ""
}
el.title = sCaptionTxt
var e = document.getElementById("fpGalleryCaptionCell_" + sID)
if (e) {
e.innerHTML = sCaptionHTML
}
var e = document.getElementById("fpGalleryDescCell_" + sID)
if (e) {
var sDesc = document.getElementById("fpGalleryDescriptions_" + sID).getElementsByTagName("div")
e.innerHTML = sDesc[iIndex]?sDesc[iIndex].innerHTML:""
}
}
}
}
function fp_ScrollLeft(sID) {
var el = document.all["fpGalleryListCell_" + sID];
if (el && fp_ie4()) {
var coll = el.children.tags("A");
var count = 20;
if (coll) {
for (i=1;i<coll.length;i++) {
if (coll(i).style.display != "none") {
coll(i-1).style.display = "inline";
break;
}
}
for (i=0;i<coll.length;i++) {
if (coll(i).style.display != "none") {
var images = coll[i].children.tags("img");
count = count + 20 + images[0].width;
if (count > widthLength)
coll(i).style.display = "none";
}
}
if ((el.scrollWidth - 5) >= el.clientWidth) {
var btn = document.all["fpGalleryRightBtn_" + sID]
if (btn && rightdisabled) {
rightdisabled = false;
te = btn.src
btn.src = btn.getAttribute ? btn.getAttribute("lowsrc") : btn.lowsrc
btn.lowsrc = te
}
}
if (coll(0).style.display != "none") {
var btn = document.all["fpGalleryLeftBtn_" + sID]
if (btn && !leftdisabled) {
leftdisabled = true;
te = btn.src
btn.src = btn.getAttribute ? btn.getAttribute("lowsrc") : btn.lowsrc
btn.lowsrc = te
}
}
}
}
}
function fp_ScrollRight(sID) {
var el = document.all["fpGalleryListCell_" + sID];
if (el && fp_ie4()) {
if (!rightdisabled)
{
var coll = el.children.tags("A");
if (coll) {
var state = 0;
var count = 20;
for (i=0;i<coll.length;i++) {
if (state == 0)
{
if (coll(i).style.display != "none") {
coll(i).style.display = "none";
state = 1;
}
}
else{
var images = coll[i].children.tags("img");
count = count + 20 + images[0].width;
if (count <= widthLength)
coll(i).style.display = "inline";
else
coll(i).style.display = "none";
}
}
}
var btn = document.all["fpGalleryRightBtn_" + sID];
if (btn && coll(coll.length - 1).style.display != "none") {
rightdisabled = true
te = btn.src
btn.src = btn.getAttribute ? btn.getAttribute("lowsrc") : btn.lowsrc
btn.lowsrc = te
}
var btn = document.all["fpGalleryLeftBtn_" + sID];
if (btn && leftdisabled) {
te = btn.src
btn.src = btn.getAttribute ? btn.getAttribute("lowsrc") : btn.lowsrc
btn.lowsrc = te
leftdisabled = false
}
}
}
}
</script>
<table border="0" cellspacing="0" cellpadding="5" width="700" dir="ltr">
<tr>
<td nowrap="" align="center">
<layer visibility="hide">
<img border="0" align="middle" src="prevdis.gif" lowsrc="prev.gif" id="fpGalleryLeftBtn_7894" onclick="JavaScript:fp_ScrollLeft(7894)" />
</layer>
<script language="JavaScript1.1">
<!--
if (fp_ie4()) {
document.write("<span align='center' style='width:558;overflow:hidden' id='fpGalleryListCell_7894'>");
}
if (fp_ns6()) {
document.getElementById("fpGalleryLeftBtn_7894").style.visibility="hidden"
}
-->
</script>
<a target="_self" href="Javascript:fp_ShowImg(document['fpphoto_5788'],'528','792','7894',0);"><img hspace="10" vspace="5" border="0" src="PT1.jpg" id="fpphoto_5788" name="fpphoto_5788" lowsrc="PT1.jpg" width="66" height="100" title="" align="absmiddle" /></a>
<a target="_self" href="Javascript:fp_ShowImg(document['fpphoto_4988'],'510','708','7894',1);"><img hspace="10" vspace="5" border="0" src="PT2.jpg" id="fpphoto_4988" name="fpphoto_4988" lowsrc="PT2.jpg" width="72" height="100" title="" align="absmiddle" /></a>
<a target="_self" href="Javascript:fp_ShowImg(document['fpphoto_268'],'500','280','7894',2);"><img hspace="10" vspace="5" border="0" src="PT5.jpg" id="fpphoto_268" name="fpphoto_268" lowsrc="PT5.jpg" width="100" height="56" title="" align="absmiddle" /></a>
<a target="_self" href="Javascript:fp_ShowImg(document['fpphoto_8348'],'360','240','7894',3);"><img hspace="10" vspace="5" border="0" src="PT9.jpg" id="fpphoto_8348" name="fpphoto_8348" lowsrc="PT9.jpg" width="100" height="66" title="" align="absmiddle" /></a>
<a target="_self" href="Javascript:fp_ShowImg(document['fpphoto_7465'],'700','466','7894',4);"><img hspace="10" vspace="5" border="0" src="PT10.jpg" id="fpphoto_7465" name="fpphoto_7465" lowsrc="PT10.jpg" width="100" height="66" title="" align="absmiddle" /></a>
<script language="JavaScript1.1">
<!--
if (fp_ns6()) {
document.write("");
}
-->
</script>
<a target="_self" href="Javascript:fp_ShowImg(document['fpphoto_9348'],'600','378','7894',5);"><img hspace="10" vspace="5" border="0" src="PT11.jpg" id="fpphoto_9348" name="fpphoto_9348" lowsrc="PT11.jpg" width="100" height="63" title="" align="absmiddle" /></a>
<a target="_self" href="Javascript:fp_ShowImg(document['fpphoto_5805'],'544','304','7894',6);"><img hspace="10" vspace="5" border="0" src="PT12.jpg" id="fpphoto_5805" name="fpphoto_5805" lowsrc="PT12.jpg" width="100" height="55" title="" align="absmiddle" /></a>
<span style="width:0;height:100;visibility:hidden">.</span>
<script language="JavaScript1.1">
<!--
if (fp_ie4()) {
document.write("</span>");
}
-->
</script>
<layer visibility="hide">
<img border="0" align="middle" src="next.gif" lowsrc="nextdis.gif" id="fpGalleryRightBtn_7894" onclick="JavaScript:fp_ScrollRight(7894)" />
<script language="JavaScript1.1">
rightdisabled = false
widthLength = 558
if (fp_ns6()) {
document.getElementById("fpGalleryRightBtn_7894").style.visibility="hidden"
}
</script>
</layer>
<hr style="height:1" />
</td>
</tr>
</table>
<img id="fpGalleryMainImg_7894" name="fpGalleryMainImg_7894" width="528" height="792" src="PT1.jpg" title="" />
<layer visibility="hide">
<div id="fpGalleryCaptionCell_7894">
</div>
<div id="fpGalleryDescCell_7894">
</div>
</layer>
</center>
</div>
<!--webbot bot="PhotoAlbum" i-checksum="46660" endspan -->
</td>
</tr>
</table>
</p>
</body>
</html>
ichwürde mich um eine hilfestellung sehr freuen
lenny