Hi inebriate,
I tried the script and It did not fly. I might be putting it into the wrong place.. I've been putting it into the bottom field (Validation script)
in the admin - product options page of this product.
Perhaps in need to be in a .js file?
I ran it in firefox just to have the error cosole tell me what it sees.
firefox says:
"missing ; before statement"
elseif (val1 > -1){
---------------------^
it has a link to follow, and here Is the full script as it shows:
Code:
<script type="text/javascript" language="JavaScript 1.2"><!--function FormValidation() { if(!check_exceptions()) { alert(exception_msg); return false; } var value = product_option_value("men_size");var value2 = product_option_value("colour_001");var val1 = value.toLowerCase().indexOf("select");var val2 = value2.toLowerCase().indexOf("select");if (val1 > -1 && val2 > -1){alert ("please choose a size and colour");return false;}elseif (val1 > -1){alert ("please choose a size");return false;}elseif (val2 > -1){alert ("please choose a colour");return false;} if(document.getElementById('product_avail')) if(document.getElementById('product_avail').value == 0) { alert("Out of stock"); return false; } return true;}--></script>
so I took this and pasted it into an online javascrip validator:
http://www.jslint.com/
It returned this:
Quote:
Error: Implied global: alert, check_exceptions, elseif, exception_msg, product_option_value
Problem at line 15 character 19: Missing semicolon.
elseif (val1 > -1){
Problem at line 16 character 1: Expected to see a statement and instead saw a block.
alert ("please choose a size");
Problem at line 16 character 1: Stopping, unable to continue. (48% scanned).
|
All I know is that it remains a puzzle.
I hope this information helps!
-hroth
I
really appreciate this help!