Gudday all
A problem has being noted to my attention that has been on my wife's site for probably quite a while and is affecting users ability to e-mail us and review their cart.
The site is
Petals & Patches - Applique, Bear, clothdoll, Stitchery, Quilt patterns
The problem concerns the E-mail Us and Review Cart buttons on the left hand side.
If you put your mouse over said buttons and look at the URL bar at the bottom of the screen you will note that you are given
Petals & Patches - Applique, Bear, clothdoll, Stitchery, Quilt patterns in front of the necessary string, which is of course giving errors and eventually a 404 error.
The script fragment below has the error in it somewhere (I have removed the extraneous portions of the script)
[js]
var otherpages = new Array("accessories", "ordering", "contact us", "stockists", "e-mail us", "links", "review cart");
for (i=0; i < otherpages.length; i++) {
if (otherpages[i].indexOf("review") != -1) { //review cart button
image_name = otherpages[i];
pageurl = "http://www8.aitsafe.com/cf/review.cfm?userid=A736163";
document.write('<a href="../' + pageurl + '"><img src="../buttons/' + image_name + '.png" alt="Review your cart" height=24 width=125 border=0 vspace=2></a>');
}
else
if (otherpages[i].indexOf("-") != -1) { //e-mail us button
image_name = otherpages[i];
pageurl = "mailto:info@petalsandpatches.com";
document.write('<a href="../' + pageurl + '"><img src="../buttons/' + image_name + '.png" alt="E-mail us" height=24 width=125 border=0 vspace=2></a>');
}
else { //all other pages
image_name = otherpages[i];
pageurl = image_name;
document.write('<a href="../' + pageurl + '.htm"><img src="../buttons/' + image_name + '.png" alt="Go to the ' + pageurl + ' page" height=24 width=125 border=0 vspace=2></a>');
}
}
[/js]
I reckon the problem is in
[js]
document.write('<a href="../' + pageurl + '"><img src="../buttons/' + image_name + '.png" alt="E-mail us" height=24 width=125 border=0 vspace=2></a>');
[/js]
and
[js]
document.write('<a href="../' + pageurl + '"><img src="../buttons/' + image_name + '.png" alt="Review your cart" height=24 width=125 border=0 vspace=2></a>');
[/js]
Perhaps I'm using the " and ' incorrectly but after much searching and trying to rewrite the code I cannot see it.
Any help gratefully accepted.