PHP and Javascript Problems--lost in TWB

From: Date: Fri, 15 Sep 2000 09:43:08 +0000
Subject: PHP and Javascript Problems--lost in TWB
Groups: php.general 
Request: Send a blank email to php-general+get-16898@lists.php.net to get a copy of this message
Right now I lost in the "TravelsWithBob.com" website. I am in the middle of transferring this photo website that was using Cold Fusion to PHP4. As of Sept 15, 2000 old site: www.travelswithbob.com (domain in the process of being transferred to the new site now) new site: www.rlorimor.phenominet.com First thing problem I ran the images filenames are case senitive on the PHP server, so the pictures were all broken due to an all-cap folder. To temporary fix that we added a checkspelling line to the .htaccess file. (I should say that it almost fix the entire problem, on the thankyou page for submitting a comment the images are still not loading despite everything I can think of trying... may also be releted to a cookie header I have on that page) Next problem I ran into was that the javascript rollovers buttons were slow, depite being preloaded with javascipt. I have even tried preloading them by hiding them on the page as single pixel images. The rollover buttons are still slow. I can also see that each time the mouse rolls over the buttons, there is a activity going on with my modem. This is strange. I was under the impression that javascript is cliet side. Haven't the images been precached? Keep in mind that the roll over were not slow with the cold fusion server and as far as I can tell, there are no request made to the server. Ok, I think... I will rename all the filenames and links to the filenames to lower case and then remove the checkspelling fix that we used in the first problem... And what happen?... All the images are broken again... and the rollovers are still slow. Here is my code for my index page. <!-- Travel Asia Photography , including Bangkok, Thailand, Phillippines, Southeast Asia by award winning photojournalist, Robert Lorimor --> <HTML> <HEAD> <TITLE>Currently in Thailand -- Travels With Bob - Robert Lorimor's Asia Photography</TITLE> <LINK REL="stylesheet" TYPE="text/css" HREF="portstyle.css"> <META NAME="Description" CONTENT="Travel Asia Photography , including Bangkok, Thailand, Phillippines, Southeast Asia."> <META NAME="Keywords" CONTENT="Asia Travel Photography, Asia Photojournalism, Asia Photojournalist, Bangkok Thailand"> <META NAME="Author" CONTENT="Robert Lorimor Asia Travel Photography"> <SCRIPT LANGUAGE="JavaScript"> <!-- <!---------- JavaScript begins... if (parent.frames[1]) parent.location.href = self.location.href; self.focus(); window.status="Click the red button to continue." // JavaScript ends ----------> function MM_swapImgRestore() { //v2.0 if (document.MM_swapImgData != null) for (var i=0; i<(document.MM_swapImgData.length-1); i+=2) document.MM_swapImgData[i].src = document.MM_swapImgData[i+1]; } function MM_preloadImages() { //v2.0 if (document.images) { var imgFiles = MM_preloadImages.arguments; if (document.preloadArray==null) document.preloadArray = new Array(); var i = document.preloadArray.length; with (document) for (var j=0; j<imgFiles.length; j++) if (imgFiles[j].charAt(0)!="#"){ preloadArray[i] = new Image; preloadArray[i++].src = imgFiles[j]; } } } function MM_swapImage() { //v2.0 var i,j=0,objStr,obj,swapArray=new Array,oldArray=document.MM_swapImgData; for (i=0; i < (MM_swapImage.arguments.length-2); i+=3) { objStr = MM_swapImage.arguments[(navigator.appName == 'Netscape')?i:i+1]; if ((objStr.indexOf('document.layers[')==0 && document.layers==null) || (objStr.indexOf('document.all[') ==0 && document.all ==null)) objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length); obj = eval(objStr); if (obj != null) { swapArray[j++] = obj; swapArray[j++] = (oldArray==null || oldArray[j-1]!=obj)?obj.src:oldArray[j]; obj.src = MM_swapImage.arguments[i+2]; } } document.MM_swapImgData = swapArray; //used for restore } //--> </SCRIPT> <STYLE TYPE="text/css"> <!-- .copyright_terms { width: auto; clip: rect( ); left: 150px; font-family: "Times New Roman", Times, serif; font-size: 9pt} --> </STYLE> </HEAD> <BODY onLoad="MM_preloadImages('images/rightbutton1.gif','#923905605740')"> <TABLE HEIGHT="794" CELLPADDING="0" CELLSPACING="0" ALIGN="center" WIDTH="554"> <TR> <TD VALIGN="bottom" WIDTH="119"> <P>&nbsp;</P> <P>&nbsp; </P> </TD> <TD VALIGN="bottom" WIDTH="350"> <BLOCKQUOTE> <B>TRAVELS WITH BOB</B></BLOCKQUOTE> </TD> <TD WIDTH="126">&nbsp; </TD> </TR> <TR> <TD VALIGN="top" WIDTH="119" HEIGHT="27">&nbsp;</TD> <TD VALIGN="top" WIDTH="350" HEIGHT="27"> <BLOCKQUOTE> <P><FONT FACE="Arial, Helvetica, sans-serif" SIZE="-1">Currently in Thailand</FONT></P> </BLOCKQUOTE> </TD> <TD WIDTH="126" HEIGHT="27">&nbsp; </TD> </TR> <TR> <TD VALIGN="top" WIDTH="119" HEIGHT="496">&nbsp;</TD> <TD VALIGN="top" WIDTH="350" HEIGHT="496"> <BLOCKQUOTE> <P><FONT FACE="Times New Roman, Times, serif" SIZE="-1">Why must I travel to Asia? It's because I never know what I might see along the way.</FONT></P> <P><FONT SIZE="-1" FACE="Times New Roman, Times, serif">At least that's why I travel... I am always looking around the next corner to see what is there. And sometimes I am totally surprised by what I find... </FONT></P> <P><FONT SIZE="-1" FACE="Times New Roman, Times, serif">I have created these pages so that you too can be surprised by what you might find along the way. Each time you come back, you will see 10 random pictures that I have shot over the years from my travels. I am inviting you travel with me... or as this site's name implies -- &quot;Travels with Bob.&quot;</FONT></P> <P><FONT SIZE="-1" FACE="Times New Roman, Times, serif">Come along as we roll along on the railroads in Thailand... or as we explore the market bazaars in the Philippines... or as we drive the dusty country roads in Iowa... </FONT></P> <P><FONT SIZE="-1" FACE="Times New Roman, Times, serif">And not just to see a point on a map... We get out and meet people as they will most likely be wearing big smiles, and some of these smiles will become friends for life. </FONT></P> <P><FONT SIZE="-1" FACE="Times New Roman, Times, serif">Come along and see what you are missing...</FONT></P> <P><FONT SIZE="-1" FACE="Times New Roman, Times, serif">Robert Lorimor</FONT></P> <P><FONT FACE="Times New Roman, Times, serif" SIZE="-1"><IMG SRC="images/bobsign1.gif" WIDTH="147" HEIGHT="24"></FONT></P> <P><FONT SIZE="-1" FACE="Times New Roman, Times, serif">Bangkok, Thailand --1998</FONT></P> </BLOCKQUOTE> <P>&nbsp;</P> </TD> <TD WIDTH="126" HEIGHT="496">&nbsp; </TD> </TR> <TR> <TD VALIGN="top" WIDTH="119">&nbsp;</TD> <TD VALIGN="top" WIDTH="350"> <P ALIGN="center"><IMG SRC="images/school1.jpg" ALT="Thailand Country School near Nakon Sawan, Thailand" WIDTH="298" HEIGHT="125"> <IMG SRC="images/boblogo5.gif" ALT="Robert Lorimor Photography - currently in Thailand, Asia and shooting some wonderful stock photo images of the Thailand way of life" WIDTH="182" HEIGHT="54"></P> <P ALIGN="center">&nbsp;</P> <BLOCKQUOTE> <DIV ALIGN="center"> <P align="center"><SMALL CLASS="copyright_terms"><FONT SIZE="3" FACE="Arial, Helvetica, sans-serif"><A HREF="corepage.htm">Continue</A></FONT></SMALL> <A HREF="corepage.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('document.imagea','document.imagea','images/rightb utton1.gif','#923905605740')"><IMG NAME="imagea" BORDER=0 SRC="images/rightbutton0.gif" WIDTH=37 HEIGHT=20></A></P> </DIV> <P ALIGN="center">&nbsp;</P> <P><SMALL CLASS="copyright_terms"><SPAN CLASS="copyright_terms">1999 © </SPAN></SMALL><SPAN CLASS="copyright_terms"><SMALL CLASS="copyright_terms">Robert Lorimor - This page and all images, text, logo, logo design and page design on the pages of this site have been copyrighted by Robert Lorimor. All rights revered. Robert Lorimor's images have been provided for you viewing pleasure only.</SMALL></SPAN></P> <P CLASS="copyright_terms"><SPAN CLASS="copyright_terms"><SMALL CLASS="copyright_terms">Site designed and developed<BR> by <A HREF="http://asiaroadexports.com/webdesign">A.R.E. Web Design</A>.</SMALL></SPAN></P> <P>&nbsp; </P> </BLOCKQUOTE> </TD> <TD WIDTH="126"> <img src="images/rightbutton0.gif" width=1 height=1 border=0 alt="Continue to more beautiful photographs from Thailand, Asia"> <img src="images/rightbutton1.gif" width=1 height=1 border=0 alt="Continue to more beautiful photographs from Thailand, Asia"> <IMG SRC="images/chiangw.jpg" WIDTH="1" HEIGHT="1"></TD> </TR> </TABLE> </BODY> </HTML> Any expert opinion out there? What can I try next?

« previous php.general (#16898) next »