Need help will placing checkbox values to the end of url
Ok, here is my situation:
When the user chooses either 4x6 or 5x7 picture size they must select additional pictures via checkboxes (not a problem). After they have selected the additional pictures and press submit, all the information needs to be displayed in the shopping cart (problem). In order for the shopping cart to know what pictures were selected they need to be added to the end of the url http://globalhopemarket.foxycart.com.
I have the following script that gets the value of the selected checkboxes:
<script type="text/javascript">
<!--
function get_check_value()
{
var c_value = "";
for (var i=0; i < document.orderform.picture.length; i++)
{
if (document.orderform.picture[i].checked)
{
c_value = c_value + document.orderform.picture[i].value + "\n";
}
}
}
//-->
</script>
Currently, this is correctly adding the values of the selected checkboxes to the local url, but I need to specify the url to be http://globalhopemarket.foxycart.com instead.
Hey jsun1310. You'd probably be better off asking this question in our forum as it is kind of specific to FoxyCart: http://forum.foxycart.com/
If you just add class="foxycart" to your form tag (not the submit tag or input tags), you shouldn't need any JavaScript at all. The cart will load up with the values you specify. You probably also want to have different names for your checkboxes other than "picture". Each input tag should have a different name.
Bookmarks