I am new to web design, having inherited this site to operate and maintain. I’m unfamiliar with JavaScript and not too fluent in html yet either. So here goes…
I have a site’s index page that always worked just fine on the net before, and still functions perfectly when viewed offline in my FrontPage 2000 window. It seems to me that the existing code is rather dense just to create an animation (which is working), one mouseover, and link the button to the main page – but what do I know?
It has been newly placed with a web host that uses Linux-based servers and they have said that there may be a case sensitivity problem with the code.
The issue is: the page loads fine and all looks perfect EXCEPT for a “Welcome” button (button 1.jpg) that is supposed to change to “Click to Enter” (button2 copy.jpg) on the mouseover. Always did before, but not now.
I have checked the file names and paths and they all appear to be spot-on for spelling, case, etc. in the images folder. Even though I know that they could be named better (underscores instead of spaces and so forth) they are working everywhere else but this host’s Linux server.
If Linux is case sensitive, what’s wrong with this code (or are those 2 separate issues?), and what can be changed to lower case in the Java script that will not mess up the scripting commands any further?
Below is all the code for the page (less the head, title, and metatags – I made sure there is no JavaScript up there). Thanks to anyone who can figure this out – I’m at a loss.
Tony
<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
}
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*URL*URL*URL
CSAct[/*CMP*URL
// –></script>
</csactiondict>
<style type=”text/css”><!–
#layer { background-image: url(‘images/dolphin_swim_md_wht.gif’); position: absolute; top: 582px; left: 520px; width: 111px; height: 41px; visibility: visible }
#layer2 { position: absolute; top: 634px; left: 453px; width: 232px; 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=”147″ height=”1″><spacer type=”block” width=”78″ height=”1″></td>
<td width=”827″ 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=”147″ height=”720″><spacer type=”block” width=”78″ height=”720″></td>
<td width=”827″ height=”720″ colspan=”1″ rowspan=”1″ valign=”top” align=”left” xpos=”78″><img height=”720″ width=”812″ 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>