Hi,
There's so many things wrong with this I don't even know where to start. Your cut and paste solution will just not work.
1. First, your html does not have a <form> tag. In order for your add to cart js functions to work you require a <form> tag at least.
2. When you click on a add-to-cart it calls a function and refers to an element in your form. Based on your choice it attempts to set certain values in your form elements. The errors you're getting are because these form elements do not exist!. Example:
Code:
<IMG SRC="Images/addtocart_small.gif"
VALUE="Add"
ONCLICK="javascript:js_activesubpage('cartadd')">
That's the html that calls the js_activesubpage function and passes a string parameter 'cartadd'. Inside the function you have:
Code:
function js_activesubpage(btn) {
document.forms[0].clickedbtn.value = 'btn';
document.forms[0].activesubpage.value = 'btn';
document.forms[0].target="_self";
document.forms[0].action="/cgi-bin/online/storepro.php";
document.forms[0].submit();
}
document.forms[0].clickedbtn refers to the form element with a name 'clickedbtn' in the first form tag on your page. You don't have a form tag at all, so you get an error no matter what. Second, there is absolutely no form element called 'clickedbtn'. There also is not any form element called 'activepage', 'activeproduct'(2 used in other functions) or 'activesubpage', for that matter. So your script is trying the set the values of form elements that do not exist.
3. Your menu on the left side uses a script called 'animate.js'. What this is supposed to do, Lord only knows. If you wish to get rid of the errors for your nav menu the first thing you need to do is have the include reflect your server. Example...
You have this in your html just before the menu starts:
Code:
<script language="JavaScript1.2"
fptype="dynamicanimation"
src="file:///C:/Program%20Files/Microsoft%20Office/Office/fpclass/animate.js">
</script>
As you can see the path refers to a your local machine, try something like: src="http://www.yourdomain.com/fpclass/animate.js"
Fix these problems then see what happens. The main thing about the cart errors is the fact that these form elements don't exist. So refer back to the original code you copied and see what you missed.
-xDev
Bookmarks