Skip to main content

Reply to "Hi Danno! Would like your expertise!"

Hi Deb,

All scripts to do the photo replaces operate almost identically, i.e. mouseover of the thumb fires a script that substitutes the replacement image associated with the thumb. The visual-arrangement of thumbs and main image is really not connected to the function of the replacement or the code.

Practicewriter has the unfortunate problem of corrupting Javascript by translating the ampersand symbol from & to &-amp; for the symbol. You can see that where the logic tests for "and" are &&, but are translated by practicewriter to &-amp;&-amp; (dash added to display in Forum). Although the script can work on practicewriter (and my mouseover and check suggests it does), a copy of the script gets the corrupted version. I do see some cases of that problem on the page, but it appears there is more script here than the simple mouseover replace. I'll have to study it for awhile to see if I'm missing something. It's a little like taking a page from a novel and trying to figure out the plot of the book. Big Grin

Since photobucket gives activity reports and did show heavy use through June (over 58,000 hits), I'll check to see if there is any current use of the photos before I delete them.

Danno

Update.....

This script appears to be the only code that is truely involved with the image replace.

This section loads the 8 images to the browser cache and the swap function is the code that's run when the mouseover is fired for each thumb.

<SCRIPT>
var pic=new Array();
pic[1]="[IMAGE1_URL]";
pic[2]="[IMAGE2_URL]";
pic[3]="[IMAGE3_URL]";
pic[4]="[IMAGE4_URL]";
pic[5]="[IMAGE5_URL]";
pic[6]="[IMAGE6_URL]";
pic[7]="[IMAGE7_URL]";
pic[8]="[IMAGE8_URL]";
function swap(num){document.getElementById('bigPic').src=pic[num] }
</SCRIPT>

This snippet of code that's on the the HTML IMG tag for each thumb is the call for that function to do the replace.

onmouseover="swap(1);" <--- this one calls swap to replace main image with image #1.

Hope that simple explanation helps.

I see other code, but I'm unsure of its intended use....appears to not really have any in the context of the document.
Last edited by danno
Copyright © 1999-2018 Auctiva.com. All rights reserved.
×
×
×
×