Click to See Complete Forum and Search --> : HTML Scripts - Image Loading & Layering


Tony Awards
06-09-2005, 12:35 AM
HTML Help!!!

I am working to repost a website that used to be on the net some time ago.

The site was created by someone else in Adobe GoLive. I am working in FrontPage 2000, and am new to all this (having worked only in FP2K templates and “themes”, not with what appear to be “from scratch” scripts like those set up in this site’s code). I assume that this should not make a difference in the actual editing, but I am lost as to how to get these final 2 objects to work:

1. There is a mouseover button on the index page that is the link to the main page. The link itself works (it is called # instead of the actual page name, and “control-clicking” to follow the link doesn’t work in FP2K’s editing mode, but whatever script was originally written does take you to the main page in browser preview mode, so that part must work), but neither the default image nor the mouseover image appear. Only the red “x” image placemarker.

2. Separately, there is also a layered gif that animates on the same index page (rolling over it shows the name <div id=layer>), and it will not show up on top of the main background image either. It has a “# layer” and a “# layer2” to help create the movement.

All the html for the site (including these 2 actions) is the same as when the site was on the net before and functioning properly. Other gif animations on separate site pages still preview offline properly – just not these two.

Image source names all appear to be correct for this home page (although they do have a ‘%20’ in their names in the html for some reason – but they seemed to work before on the net even so), and all the necessary images are still in the Images folder in the site. Inside the Images folder there are 2 images for the mouseover button, and 3 for the animated gif, although only one is specified for each in the html. Maybe it’s specified in the script for each of them as to how to read and animate those images.

Other pages’ images (animated gifs with both a src and lowsrc) have normal names that match exactly the images in the Image folder. However, when I changed the names of my 2 problem images to match the source image names exactly, they still would not appear nor animate.

And finally, the entire large index page image (of which the above elements are embedded parts) on the home page is off-center to the left when previewed in IE6, even though in FrontPage editing mode there is more free background space showing on that same left side…?

All else on every other page on the site works just fine in offline preview mode (as before when the site was on the net) – just not these 2 index page objects: the layered gif animation and the mouseover button images.

Any ideas? If you can help but need a piece of the html to figure it out, let me know and I’ll post it to you.

Thanks very much.

Tony

BonRouge
06-09-2005, 12:50 AM
It's very difficult to help if you don't show us the page you're working on...

Tony Awards
06-09-2005, 01:47 AM
You're right, of course. Here it is, but the images won't be there. The problems are witht the <div #layer> (the dolphin_swim_md_wht.gif animation) and the mouseover html at the bottom of the page.
I hope this helps - thanks for such a quick response!

Tony
***********************


<html>

<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Microsoft FrontPage 4.0">
<title>xxx</title>
<meta name="description" content="xxx">
<meta name="keywords" content="xxx">
<csactions>
<csaction name="11A0DB1" class="Goto Link" type="ONEVENT" val0="Main.html" val1>
</csactions>
<csscriptdict>
<script><!--
CSStopExecution = false;
CSInit = new Array;
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);
}
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
}
CSAg = window.navigator.userAgent; CSBVers = parseInt(CSAg.charAt(CSAg.indexOf("/")+1),10);
function IsIE() { return CSAg.indexOf("MSIE") > 0;}
function CSIEStyl(s) { return document.all.tags("div")[s].style; }
function CSNSStyl(s) { return CSFindElement(s,0); }
function CSFindElement(n,ly) { if (CSBVers < 4) return document[n];
var curDoc = ly ? ly.document : document; var elem = curDoc[n];
if (!elem) { for (var i=0;i<curDoc.layers.length;i++) {
elem = CSFindElement(n,curDoc.layers[i]); if (elem) return elem; }}
return elem;
}
function CSButtonReturn () {
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 false; // follow link
else return true; // follow link
}
CSIm = new Object();
function CSIShow(n,i) {
if (document.images) {
if (CSIm[n]) {
var img = (!IsIE()) ? CSFindElement(n,0) : document[n];
if (img && typeof(CSIm[n][i].src) != "undefined") {img.src = CSIm[n][i].src;}
if(i != 0)
self.status = CSIm[n][3];
else
self.status = " ";
return true;
}
}
return false;
}
function CSILoad(action) {
im = action[1];
if (document.images) {
CSIm[im] = new Object();
for (var i=2;i<5;i++) {
if (action[i] != '') { CSIm[im][i-2] = new Image(); CSIm[im][i-2].src = action[i]; }
else CSIm[im][i-2] = 0;
}
CSIm[im][3] = action[5];
}
}
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 actArray = fct[array[i]];
if(actArray == null) return false;
var tempArray = new Array;
for(var j=1;j<actArray.length;j++) {
if((actArray[j] != null) && (typeof(actArray[j]) == "object") && (actArray[j].length == 2)) {
if(actArray[j][0] == "VAR") {
tempArray[j] = CSStateArray[actArray[j][1]];
}
else {
if(actArray[j][0] == "ACT") {
tempArray[j] = CSAction(new Array(new String(actArray[j][1])));
}
else
tempArray[j] = actArray[j];
}
}
else
tempArray[j] = actArray[j];
}
result = actArray[0](tempArray);
}
return result;
}
CSAct = new Object;

function CSGotoLink(action) {
if (action[2].length) {
var hasFrame=false;
for(i=0;i<parent.frames.length;i++) { if (parent.frames[i].name==action[2]) { hasFrame=true; break;}}
if (hasFrame==true)
parent.frames[action[2]].location = action[1];
else
window.open (action[1],action[2],"");
}
else location = action[1];
}

// --></script>
</csscriptdict>
<csactiondict>
<script><!--
CSInit[CSInit.length] = new Array(CSILoad,/*CMP*/'Button',/*URL*/'../Images/Button 1.jpg',/*URL*/'../Images/Button2 copy.jpg',/*URL*/'','');
CSAct[/*CMP*/ '11A0DB1'] = new Array(CSGotoLink,/*URL*/ 'Main.html','');

// --></script>
</csactiondict>
<style type="text/css"><!--
#layer { background-image: url('../Images/dolphin_swim_md_wht.gif'); position: absolute; top: 582px; left: 458px; width: 81px; height: 41px; visibility: visible }
#layer2 { position: absolute; top: 634px; left: 391px; width: 202px; height: 59px; visibility: visible }-->
</style>
</head>

<body bgcolor="#6699ff" onload="CSScriptInit();">
<table cool width="970" height="721" border="0" cellpadding="0" cellspacing="0" gridx="16" showgridx usegridx gridy="16" showgridy usegridy bgcolor="#6699ff">
<tr height="1" cntrlrow>
<td width="1" height="1"><spacer type="block" width="1" height="1"></td>
<td width="78" height="1"><spacer type="block" width="78" height="1"></td>
<td width="891" height="1"><spacer type="block" width="891" height="1"></td>
</tr>
<tr height="720">
<td width="1" height="720"><spacer type="block" width="1" height="720"></td>
<td width="78" height="720"><spacer type="block" width="78" height="720"></td>
<td width="891" height="720" colspan="1" rowspan="1" valign="top" align="left" xpos="78"><img height="720" width="812" img src="Images/Pearl cover.jpg" lowsrc="Images/Pearl coverls.gif" autolowsrc border="0"></td>
</tr>
</table>
<div id="layer2">
<center>
<font size="5" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#663399"><csobj w="200" h="59" t="Button" ht="../Images/Button2 copy.jpg" csclick="11A0DB1"><a href="#" onmouseover="return CSIShow(/*CMP*/'Button',1)" onmouseout="return CSIShow(/*CMP*/'Button',0)" onclick="CSAction(new Array(/*CMP*/'11A0DB1'));return CSClickReturn()"><img src="../Images/Button 1.jpg" width="200" height="59" name="Button" border="0"></a></csobj></font></center>
</div>
<div id="layer">
</div>
</body>

</html>