Click to See Complete Forum and Search --> : JavaScript error.
stdhk665
03-07-2003, 01:33 AM
Could one of you graceful master debug this for me please.
cuz am begining to see double form the screen.
I am having problem that I can't get the text to appear when click on a pict.
neither will the pict appear now.
it used to do fine til I modified it and now it is a mess.
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>SDK_Wes_Pict_Page_01</title>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- head Java Filmstrip begin -- loader -->
<!-- Begin
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);
var arMsg;
arMsg = new Array(20);
arMsg[ 0] = 'Rod, Geri, Melissa & Wes In Utal Skiing.';
arMsg[ 1] = 'Rod & Geri --> Wes's Parents';
arMsg[ 2] = 'Wes & Melissa In Utal.';
arMsg[ 3] = 'Wes & Melissa On The Tree In Front Of Wes's House K I S S I N G (there's suppose to be a dog there, but I ate him).';
arMsg[ 4] = 'Wes & Melissa New Year Pict.';
arMsg[ 5] = 'Wes & Melissa On Wes's Birthday.';
arMsg[ 6] = 'Tyler, Geri, Wes, Melissa, Wes Other Brother, and Tyler's GF.';
arMsg[ 7] = 'These People Has An Aptitute For Drinking.';
arMsg[ 8] = 'Wes, Tyler, Melissa.';
arMsg[ 9] = 'Wes's Other Brother, Wes(in the back), Geri, Tyler & Rod (on the floor)';
arMsg[10] = 'This is picture 4';
arMsg[11] = 'This is picture 4';
arMsg[12] = 'This is picture 4';
arMsg[13] = 'This is picture 4';
arMsg[14] = 'This is picture 4';
arMsg[15] = 'This is picture 4';
arMsg[16] = 'This is picture 4';
arMsg[17] = 'This is picture 4';
arMsg[18] = 'This is picture 4';
arMsg[19] = 'This is picture 4';
function doPic(imgName)
{
if (ns3up || ie4up)
{
imgOn = ("" + imgName);
document.mainpic.src = imgOn;
}
}
// End -->
</script>
<!-- head Java Filmstrip ends -->
</HEAD>
</head>
<BODY text="#FFFFFF" bgcolor="#000000">
<SCRIPT LANGUAGE="JavaScript">
<!--Written by SDK-->
<!--Take my codes wid out asking will result in your death-->
<!-- Begin
/*
status bar
*/
//set message:
msg = "Welcome to Wesley Walz's Picture Page on SDK's Site";
timeID = 10;
stcnt = 16;
wmsg = new Array(33);
wmsg[0]=msg;
blnk = " ";
for (i=1; i<32; i++)
{
b = blnk.substring(0,i);
wmsg[i]="";
for (j=0; j<msg.length; j++) wmsg[i]=wmsg[i]+msg.charAt(j)+b;
}
function wiper()
{
if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
if (stcnt-- < -40) stcnt=31;
status = str;
clearTimeout(timeID);
timeID = setTimeout("wiper()",100);
}
wiper()
// -->
// End -->
</script>
<p>
<!-- Script Size: 1.28 KB -->
<center>
<!-- ********* MASTER TABLE *************** -->
<table border="0" width="1268" height="1024">
<tr>
<td background="../My%20Documents/My%20Pictures/New%20Folder%20(3)/WGW/WGWPictPage01.jpg" height="1024" valign="bottom" width="4">
<!-- ********* SINGLE CELL WITH BACKGROUND *************** -->
<BODY>
<table width="1268" border=0 cellspacing=0 cellpadding=0>
<!--Top Row of Picts-->
<tr>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWFam.JPG'); javascript:ShowText(19);"><img src="WGWFam_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWParents.JPG'); javascript:ShowText(18);"><img src="WGWParents_small.JPG" width=123 height=122 border=00></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW%20&%20MJ%2001.JPG'); javascript:ShowText(17);"><img src="WGW%20&%20MJ%2001_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW & MJ 02.JPG'); javascript:ShowText(16);"><img src="WGW & MJ 02_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW%20&%20MJ%20NYr.JPG'); javascript:ShowText(15);"><img src="WGW%20&%20MJ%20NYr_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW&MJ.JPG'); javascript:ShowText(14);"><img src="WGW&MJ_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpKit02.JPG'); javascript:ShowText(13);"><img src="WGWBDGrpKit02_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpDrk.JPG'); javascript:ShowText(12);"><img src="WGWBDGrpDrk_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpKit01.JPG'); javascript:ShowText(11);"><img src="WGWBDGrpKit01_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="143" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWJstFam.JPG'); javascript:ShowText(10);"><img src="WGWJstFam_small.JPG" width=123 height=122 border=0></a></td>
</center>
</tr>
<tr>
<!-- The fullsize pict -->
<td colspan=10 rowspan=1 align=center width="1268" height="478">
<img name="mainpic" src="p1.jpg" width=1268 height=509 border=0></td>
</tr>
<!-- Bottom Row of Picts-->
<tr>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWFam.JPG'); javascript:ShowText(0);"><img src="WGWFam_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWParents.JPG'); javascript:ShowText(1);"><img src="WGWParents_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW%20&%20MJ%2001.JPG'); javascript:ShowText(2);"><img src="WGW%20&%20MJ%2001_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW & MJ 02.JPG'); javascript:ShowText(3);"><img src="WGW & MJ 02_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW%20&%20MJ%20NYr.JPG'); javascript:ShowText(4);"><img src="WGW%20&%20MJ%20NYr_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW&MJ.JPG'); javascript:ShowText(5);"><img src="WGW&MJ_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpKit02.JPG'); javascript:ShowText(6);"><img src="WGWBDGrpKit02_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpDrk.JPG'); javascript:ShowText(7);"><img src="WGWBDGrpDrk_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpKit01.JPG'); javascript:ShowText(8);"><img src="WGWBDGrpKit01_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWJstFam.JPG'); javascript:ShowText(9);"><img src="WGWJstFam_small.JPG" width=123 height=122 border=0></a></td>
</center>
</tr>
</table>
<div ID=test> <p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </div>
</center></td>
</tr>
</table> <!-- ********* END MASTER TABLE *************** -->
</center>
</BODY>
</html>
<script language="javascript">
function ShowText(PictCapts)
{
test.innerText = arMsg[PictCapts];
}
</script>[COLOR=red][COLOR=red][B][COLOR=red][COLOR=red]
skriptor
03-07-2003, 02:06 AM
Hi Steven,
here are some hints:
Don't use ' to sign strings, if you use this character inside:
wrong: 'Wes & Melissa On Wes's Birthday.';
right: "Wes & Melissa On Wes's Birthday.";
Javascriptcalls in a-tags:
wrong:<a href="java script:doPic('../My Documents/Wes Clear/WGWParents.JPG'); java script:ShowText(18);">
right:<a href="javascript:doPic('../My Documents/Wes Clear/WGWFam.JPG');ShowText(19);">
And tidy up your code: Only one head-section. all javascript into head-section, only one body-section...
Good luck, skriptor
stdhk665
03-07-2003, 02:08 AM
Kriptor, You are now officially, my JS God.
thanks so much.
stdhk665
03-07-2003, 02:27 AM
oops, but the page is still screwed up
no text display and no picture either
stdhk665
03-07-2003, 02:33 AM
I made the changes like you suggested, but it is still rendered dead.
I am so frustrated wid this thing.
stdhk665
03-07-2003, 02:34 AM
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>SDK_Wes_Pict_Page_01</title>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- head Java Filmstrip begin -- loader -->
<!-- Begin
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);
var arMsg;
arMsg = new Array(20);
arMsg[ 0] = "Rod, Geri, Melissa & Wes In Utal Skiing.";
arMsg[ 1] = "Rod & Geri --> Wes's Parents";
arMsg[ 2] = "Wes & Melissa In Utal.";
arMsg[ 3] = "Wes & Melissa On The Tree In Front Of Wes's House K I S S I N G (there's suppose to be a dog there, but I ate him).";
arMsg[ 4] = "Wes & Melissa New Year Pict.";
arMsg[ 5] = "Wes & Melissa On Wes's Birthday.";
arMsg[ 6] = "Tyler, Geri, Wes, Melissa, Wes Other Brother, and Tyler's GF.";
arMsg[ 7] = "These People Has An Aptitute For Drinking.";
arMsg[ 8] = "Wes, Tyler, Melissa.";
arMsg[ 9] = "Wes's Other Brother, Wes(in the back), Geri, Tyler & Rod (on the floor)";
arMsg[10] = "This is picture 4";
arMsg[11] = "This is picture 4";
arMsg[12] = 'This is picture 4";
arMsg[13] = "This is picture 4";
arMsg[14] = "This is picture 4";
arMsg[15] = "This is picture 4";
arMsg[16] = "This is picture 4";
arMsg[17] = "This is picture 4";
arMsg[18] = "This is picture 4";
arMsg[19] = "This is picture 4";
function doPic(imgName)
{
if (ns3up || ie4up)
{
imgOn = ("" + imgName);
document.mainpic.src = imgOn;
}
}
// End -->
</script>
<!-- head Java Filmstrip ends -->
</HEAD>
</head>
<BODY text="#FFFFFF" bgcolor="#000000">
<SCRIPT LANGUAGE="JavaScript">
<!--Written by SDK-->
<!--Take my codes wid out asking will result in your death-->
<!-- Begin
/*
status bar
*/
//set message:
msg = "Welcome to Wesley Walz's Picture Page on SDK's Site";
timeID = 10;
stcnt = 16;
wmsg = new Array(33);
wmsg[0]=msg;
blnk = " ";
for (i=1; i<32; i++)
{
b = blnk.substring(0,i);
wmsg[i]="";
for (j=0; j<msg.length; j++) wmsg[i]=wmsg[i]+msg.charAt(j)+b;
}
function wiper()
{
if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
if (stcnt-- < -40) stcnt=31;
status = str;
clearTimeout(timeID);
timeID = setTimeout("wiper()",100);
}
wiper()
// -->
// End -->
</script>
<p>
<!-- Script Size: 1.28 KB -->
<center>
<!-- ********* MASTER TABLE *************** -->
<table border="0" width="1268" height="1024">
<tr>
<td background="../My%20Documents/My%20Pictures/New%20Folder%20(3)/WGW/WGWPictPage01.jpg" height="1024" valign="bottom" width="4">
<!-- ********* SINGLE CELL WITH BACKGROUND *************** -->
<BODY>
<table width="1268" border=0 cellspacing=0 cellpadding=0>
<!--Top Row of Picts-->
<tr>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWFam.JPG'); ShowText(19);"><img src="WGWFam_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWParents.JPG'); ShowText(18);"><img src="WGWParents_small.JPG" width=123 height=122 border=00></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW%20&%20MJ%2001.JPG'); ShowText(17);"><img src="WGW%20&%20MJ%2001_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW & MJ 02.JPG'); ShowText(16);"><img src="WGW & MJ 02_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW%20&%20MJ%20NYr.JPG'); ShowText(15);"><img src="WGW%20&%20MJ%20NYr_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW&MJ.JPG'); ShowText(14);"><img src="WGW&MJ_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpKit02.JPG'); ShowText(13);"><img src="WGWBDGrpKit02_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpDrk.JPG'); ShowText(12);"><img src="WGWBDGrpDrk_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpKit01.JPG'); ShowText(11);"><img src="WGWBDGrpKit01_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="143" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWJstFam.JPG'); ShowText(10);"><img src="WGWJstFam_small.JPG" width=123 height=122 border=0></a></td>
</center>
</tr>
<tr>
<!-- The fullsize pict -->
<td colspan=10 rowspan=1 align=center width="1268" height="478">
<img name="mainpic" src="p1.jpg" width=1268 height=509 border=0></td>
</tr>
<!-- Bottom Row of Picts-->
<tr>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWFam.JPG'); ShowText(0);"><img src="WGWFam_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWParents.JPG'); ShowText(1);"><img src="WGWParents_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW%20&%20MJ%2001.JPG'); ShowText(2);"><img src="WGW%20&%20MJ%2001_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW & MJ 02.JPG'); ShowText(3);"><img src="WGW & MJ 02_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW%20&%20MJ%20NYr.JPG'); ShowText(4);"><img src="WGW%20&%20MJ%20NYr_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW&MJ.JPG'); ShowText(5);"><img src="WGW&MJ_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpKit02.JPG'); ShowText(6);"><img src="WGWBDGrpKit02_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpDrk.JPG'); ShowText(7);"><img src="WGWBDGrpDrk_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpKit01.JPG'); ShowText(8);"><img src="WGWBDGrpKit01_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWJstFam.JPG'); ShowText(9);"><img src="WGWJstFam_small.JPG" width=123 height=122 border=0></a></td>
</center>
</tr>
</table>
<div ID=test> <p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </div>
</center></td>
</tr>
</table> <!-- ********* END MASTER TABLE *************** -->
</center>
</BODY>
</html>
<script language="javascript">
function ShowText(PictCapts)
{
test.innerText = arMsg[PictCapts];
}
</script>
cyberade
03-07-2003, 05:18 AM
I've had a go at tidying up some of the more obvious things in the code for you There may still be some errors in there (like I'm not sure about those html entries) but have a look and see if it works now.
[code]
<html xmlns="urn:schemas-microsoft-com:vml" xmlns="urn:schemas-microsoft-comfficeffice" xmlns="http://www.w3.org/TR/REC-html40">
<HEAD>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>SDK_Wes_Pict_Page_01</title>
<script language="javascript">
function ShowText(PictCapts)
{
test.innerText = arMsg[PictCapts];
}
</script>
<SCRIPT LANGUAGE="JavaScript">
<!-- head Java Filmstrip begin -- loader -->
<!-- Begin
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);
var arMsg;
arMsg = new Array(20);
arMsg[ 0] = "Rod, Geri, Melissa & Wes In Utal Skiing.";
arMsg[ 1] = "Rod & Geri -- Wes's Parents";
arMsg[ 2] = "Wes & Melissa In Utal.";
arMsg[ 3] = "Wes & Melissa On The Tree In Front Of Wes's House K I S S I N G (there's suppose to be a dog there, but I ate him).";
arMsg[ 4] = "Wes & Melissa New Year Pict.";
arMsg[ 5] = "Wes & Melissa On Wes's Birthday.";
arMsg[ 6] = "Tyler, Geri, Wes, Melissa, Wes Other Brother, and Tyler's GF.";
arMsg[ 7] = "These People Has An Aptitute For Drinking.";
arMsg[ 8] = "Wes, Tyler, Melissa.";
arMsg[ 9] = "Wes's Other Brother, Wes(in the back), Geri, Tyler & Rod (on the floor)";
arMsg[10] = "This is picture 4";
arMsg[11] = "This is picture 4";
arMsg[12] = "This is picture 4";
arMsg[13] = "This is picture 4";
arMsg[14] = "This is picture 4";
arMsg[15] = "This is picture 4";
arMsg[16] = "This is picture 4";
arMsg[17] = "This is picture 4";
arMsg[18] = "This is picture 4";
arMsg[19] = "This is picture 4";
function doPic(imgName)
{
if (ns3up || ie4up)
{
imgOn = ("" + imgName);
document.mainpic.src = imgOn;
}
}
// End -->
</script>
<!-- head Java Filmstrip ends -->
<SCRIPT LANGUAGE="JavaScript">
<!--Written by SDK-->
<!--Take my codes wid out asking will result in your death-->
<!-- Begin
/*
status bar
*/
//set message:
msg = "Welcome to Wesley Walz's Picture Page on SDK's Site";
timeID = 10;
stcnt = 16;
wmsg = new Array(33);
wmsg[0]=msg;
blnk = " ";
for (i=1; i<32; i++)
{
b = blnk.substring(0,i);
wmsg[i]="";
for (j=0; j<msg.length; j++) wmsg[i]=wmsg[i]+msg.charAt(j)+b;
}
function wiper()
{
if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
if (stcnt-- < -40) stcnt=31;
status = str;
clearTimeout(timeID);
timeID = setTimeout("wiper()",100);
}
wiper()
// -->
// End -->
</script>
</HEAD>
<BODY text="#FFFFFF" bgcolor="#000000">
<p>
<!-- Script Size: 1.28 KB -->
<center>
<!-- ********* MASTER TABLE *************** -->
<table border="0" width="1268" height="1024">
<tr>
<td background="../My Documents/My Pictures/New Folder (3)/WGW/WGWPictPage01.jpg" height="1024" valign="bottom" width=100%>
<!-- ********* SINGLE CELL WITH BACKGROUND *************** -->
<table width="1268" border=0 cellspacing=0 cellpadding=0>
<!--Top Row of Picts-->
<tr>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWFam.JPG'); ShowText(19);"><img src="WGWFam_small.JPG" width=123 height=122 border=0></a>
</center></td>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWParents.JPG'); ShowText(18);"><img src="WGWParents_small.JPG" width=123 height=122 border=00></a>
</center></td>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW & MJ 01.JPG'); ShowText(17);"><img src="WGW & MJ 01_small.JPG" width=123 height=122 border=0></a>
</center></td>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW & MJ 02.JPG'); ShowText(16);"><img src="WGW & MJ 02_small.JPG" width=123 height=122 border=0></a>
</center></td>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW & MJ NYr.JPG'); ShowText(15);"><img src="WGW & MJ NYr_small.JPG" width=123 height=122 border=0></a>
</center></td>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW&MJ.JPG'); ShowText(14);"><img src="WGW&MJ_small.JPG" width=123 height=122 border=0></a>
</center></td>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpKit02.JPG'); ShowText(13);"><img src="WGWBDGrpKit02_small.JPG" width=123 height=122 border=0></a>
</center></td>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpDrk.JPG'); ShowText(12);"><img src="WGWBDGrpDrk_small.JPG" width=123 height=122 border=0></a>
</center></td>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpKit01.JPG'); ShowText(11);"><img src="WGWBDGrpKit01_small.JPG" width=123 height=122 border=0></a>
</center></td>
<td width="143" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWJstFam.JPG'); ShowText(10);"><img src="WGWJstFam_small.JPG" width=123 height=122 border=0></a>
</center></td>
</tr>
<tr>
<!-- The fullsize pict -->
<td colspan=10 rowspan=1 align=center width="1268" height="478">
<img name="mainpic" src="p1.jpg" width=1268 height=509 border=0></td>
</tr>
<!-- Bottom Row of Picts-->
<tr>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWFam.JPG'); ShowText(0);"><img src="WGWFam_small.JPG" width=123 height=122 border=0></a>
</center></td>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWParents.JPG'); ShowText(1);"><img src="WGWParents_small.JPG" width=123 height=122 border=0></a>
</center></td>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW & MJ 01.JPG'); ShowText(2);"><img src="WGW & MJ 01_small.JPG" width=123 height=122 border=0></a>
</center></td>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW & MJ 02.JPG'); ShowText(3);"><img src="WGW & MJ 02_small.JPG" width=123 height=122 border=0></a>
</center></td>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW & MJ NYr.JPG'); ShowText(4);"><img src="WGW & MJ NYr_small.JPG" width=123 height=122 border=0></a>
</center></td>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW&MJ.JPG'); ShowText(5);"><img src="WGW&MJ_small.JPG" width=123 height=122 border=0></a>
</center></td>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpKit02.JPG'); ShowText(6);"><img src="WGWBDGrpKit02_small.JPG" width=123 height=122 border=0></a>
</center></td>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpDrk.JPG'); ShowText(7);"><img src="WGWBDGrpDrk_small.JPG" width=123 height=122 border=0></a>
</center></td>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpKit01.JPG'); ShowText(8);"><img src="WGWBDGrpKit01_small.JPG" width=123 height=122 border=0></a>
</center></td>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWJstFam.JPG'); ShowText(9);"><img src="WGWJstFam_small.JPG" width=123 height=122 border=0></a>
</center></td>
</tr>
</table>
<div ID=test> <p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </div>
</td>
</tr>
</table> <!-- ********* END MASTER TABLE *************** -->
</center>
</BODY>
</html>
stdhk665
03-07-2003, 01:25 PM
Dear Cyberade & Sckriptor.
I have tried both of your method.
and you don't even began to know how much I appreciate you tidy up my codes. :) . it look neater and more like a real person coded it.:p .
but for some reason the page still wil not run. jserror.
If you have time, I uploaded the nessessary files for you to test it wid.
the background pict is also there.
I need fo rthe background to coorespond wid the picts, the squares on the background.
and for the ca[ption to come on when you click each image.
I had it so that it shows the image, correctly. but then when I tried putting in the JS to do the caption thing, the pict won't show.
my luck.:rolleyes: :confused:
So, any help from you all, would be owed to eternity.
thanks.
stdhk665
03-07-2003, 01:36 PM
Here is the Background.
http://www.angelfire.com/va3/wgwpicts/PictsBgrns/WGWPictPage01.jpg
I loaded it to this directory.
cuz the file was more than the size allow here.
again, thank you all so so so ss oso sos so very much.
cyberade
03-07-2003, 10:41 PM
First of all, I found that clicking your 'index.htm' file opened as a text file so I had to cut and paste and save it as an HTML file. It then opened without error.
To make the text work change all java<space>script to javascript (one word).
To get the background as you wanted it I removed the 'master table' altogether and placed the background image in the body tag
<BODY text="#FFFFFF" bgcolor="#000000" background="../My Documents/My Pictures/New Folder (3)/WGW/WGWPictPage01.jpg">
then set the height for the main picture cell and img to 490.
Try those changes and see how you get on.
stdhk665
03-07-2003, 10:51 PM
I did Xactly as you instructed, but the scripts still error.
I mod the tags as you said, and then I went to preview and it tells me my scripts are errors.
and the alignment are no longer there.
khalidali63
03-07-2003, 11:32 PM
Well here you go,you can relax now.
The text appears at the very bottom of the page,which ofcourse, can be displayed at any point on the page
cheers
Khalid
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-5"/>
<meta name="Author" content="Khalid Ali"/>
<title>Untitled</title>
<link type="text/css" rel="stylesheet" href="http://68.145.35.86/skills/javascripts/style/js_tutorials_style.css"/>
<style type="text/css">
</style>
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns="urn:schemas-microsoft-comfficeffice" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>SDK_Wes_Pict_Page_01</title>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- head Java Filmstrip begin -- loader -->
<!-- Begin
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);
var arMsg;
arMsg = new Array(20);
arMsg[ 0] = "Rod, Geri, Melissa & Wes In Utal Skiing.";
arMsg[ 1] = "Rod & Geri --> Wes's Parents";
arMsg[ 2] = "Wes & Melissa In Utal.";
arMsg[ 3] = "Wes & Melissa On The Tree In Front Of Wes's House K I S S I N G (there's suppose to be a dog there, but I ate him).";
arMsg[ 4] = "Wes & Melissa New Year Pict.";
arMsg[ 5] = "Wes & Melissa On Wes's Birthday.";
arMsg[ 6] = "Tyler, Geri, Wes, Melissa, Wes Other Brother, and Tyler's GF.";
arMsg[ 7] = "These People Has An Aptitute For Drinking.";
arMsg[ 8] = "Wes, Tyler, Melissa.";
arMsg[ 9] = "Wes's Other Brother, Wes(in the back), Geri, Tyler & Rod (on the floor)";
arMsg[10] = "This is picture 4";
arMsg[11] = "This is picture 4";
arMsg[12] = "This is picture 4";
arMsg[13] = "This is picture 4";
arMsg[14] = "This is picture 4";
arMsg[15] = "This is picture 4";
arMsg[16] = "This is picture 4";
arMsg[17] = "This is picture 4";
arMsg[18] = "This is picture 4";
arMsg[19] = "This is picture 4";
function doPic(imgName){
if (ns3up || ie4up){
imgOn = ("" + imgName);
document.mainpic.src = imgOn;
}
}
// End -->
</script>
<!-- head Java Filmstrip ends -->
</HEAD>
</head>
<BODY text="#FFFFFF" bgcolor="#000000">
<SCRIPT LANGUAGE="JavaScript">
<!--Written by SDK-->
<!--Take my codes wid out asking will result in your death-->
<!-- Begin
/*
status bar
*/
//set message:
msg = "Welcome to Wesley Walz's Picture Page on SDK's Site";
timeID = 10;
stcnt = 16;
wmsg = new Array(33);
wmsg[0]=msg;
blnk = " ";
for (i=1; i<32; i++)
{
b = blnk.substring(0,i);
wmsg[i]="";
for (j=0; j<msg.length; j++) wmsg[i]=wmsg[i]+msg.charAt(j)+b;
}
function wiper()
{
if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
if (stcnt-- < -40) stcnt=31;
status = str;
clearTimeout(timeID);
timeID = setTimeout("wiper()",100);
}
wiper()
// -->
// End -->
</script>
<p>
<!-- Script Size: 1.28 KB -->
<center>
<!-- ********* MASTER TABLE *************** -->
<table border="0" width="1268" height="1024">
<tr>
<td background="../My%20Documents/My%20Pictures/New%20Folder%20(3)/WGW/WGWPictPage01.jpg" height="1024" valign="bottom" width="4">
<!-- ********* SINGLE CELL WITH BACKGROUND *************** -->
<BODY>
<table width="1268" border=0 cellspacing=0 cellpadding=0>
<!--Top Row of Picts-->
<tr>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWFam.JPG'); javascript:ShowText(19);"><img src="WGWFam_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWParents.JPG'); javascript:ShowText(18);"><img src="WGWParents_small.JPG" width=123 height=122 border=00></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW%20&%20MJ%2001.JPG'); javascript:ShowText(17);"><img src="WGW%20&%20MJ%2001_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW & MJ 02.JPG'); javascript:ShowText(16);"><img src="WGW & MJ 02_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW%20&%20MJ%20NYr.JPG'); javascript:ShowText(15);"><img src="WGW%20&%20MJ%20NYr_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW&MJ.JPG'); javascript:ShowText(14);"><img src="WGW&MJ_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpKit02.JPG'); javascript:ShowText(13);"><img src="WGWBDGrpKit02_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpDrk.JPG'); javascript:ShowText(12);"><img src="WGWBDGrpDrk_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpKit01.JPG'); javascript:ShowText(11);"><img src="WGWBDGrpKit01_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="143" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWJstFam.JPG'); javascript:ShowText(10);"><img src="WGWJstFam_small.JPG" width=123 height=122 border=0></a></td>
</center>
</tr>
<tr>
<!-- The fullsize pict -->
<td colspan=10 rowspan=1 align=center width="1268" height="478">
<img name="mainpic" src="p1.jpg" width=1268 height=509 border=0></td>
</tr>
<!-- Bottom Row of Picts-->
<tr>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWFam.JPG'); javascript:ShowText(0);"><img src="WGWFam_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWParents.JPG'); javascript:ShowText(1);"><img src="WGWParents_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW%20&%20MJ%2001.JPG'); javascript:ShowText(2);"><img src="WGW%20&%20MJ%2001_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW & MJ 02.JPG'); javascript:ShowText(3);"><img src="WGW & MJ 02_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW%20&%20MJ%20NYr.JPG'); javascript:ShowText(4);"><img src="WGW%20&%20MJ%20NYr_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGW&MJ.JPG'); javascript:ShowText(5);"><img src="WGW&MJ_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpKit02.JPG'); javascript:ShowText(6);"><img src="WGWBDGrpKit02_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpDrk.JPG'); javascript:ShowText(7);"><img src="WGWBDGrpDrk_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWBDGrpKit01.JPG'); javascript:ShowText(8);"><img src="WGWBDGrpKit01_small.JPG" width=123 height=122 border=0></a></td>
</center>
<td width="131" height="49">
<center>
<a href="javascript:doPic('../My Documents/Wes Clear/WGWJstFam.JPG'); javascript:ShowText(9);"><img src="WGWJstFam_small.JPG" width=123 height=122 border=0></a></td>
</center>
</tr>
</table>
</td>
</tr>
</table> <!-- ********* END MASTER TABLE *************** -->
<div ID="test" style="color:white;"> </div>
</center>
<script language="javascript">
function ShowText(PictCapts){
document.getElementById("test").innerHTML = arMsg[PictCapts];
}
</script>
</center>
</BODY>
</html>
stdhk665
03-08-2003, 05:02 PM
First, I would like to thank you all for tending to this matter of mine.
Second, I would like to let you know, that I am begining to think I am an idiot. which I probably am.
Third, no matter what I do to this page. it does not seem to want to work for me.
I had performed all instructions from each one of you who has responded. Yet the page does not work.
all I want is for the javascripts to do.
1. when I click on the thumbnail. it display the picture in the middle of the page. between the first and second array of thumbnails. and the caption at the bottom, right underneath the second thumb array.
not at the bottom of the page. just below the pict.
Ohh and when you fix my errors could you reload the zip file bak up here fo rme please.
cuz am having problem cut and pasting from this page.
2. I need the bottom thumbnail array to align wid the blocks.
3. I think I got most of the codes in. just matter of knowing and seeing what I screwed up.
4. I am nottorious for screwing up codes. so I do want to thank those of you who are doing me a fav by repairing my damages.
Thanks.
khalidali63
03-08-2003, 05:42 PM
put some images in the zip file as well for proof of concept...like thumbnails and larger images that need to appear in the middle,just a few would be good enough
stdhk665
03-09-2003, 06:01 PM
here is the code for the page.
khalidali63
03-09-2003, 07:05 PM
Take a look at this link.I am emailing
http://68.145.35.86/temp/stdhk665/ScriptError-stdhk665.html
you the zip file with image and code
Khalid