can any body tell me why my code error on firefox?
HTML:
Size : <select class="size" id="size<?php echo $dat_women->id; ?>" name="size" onchange="change_size(<?php echo $dat_women->id; ?>)">
JS:
function change_size(id_product){
var size = document.getElementById(event.target.id).value;
$.ajax({
dataType:"json",
url: site_url + "main/add_cart/" + id_product + "/" + size,
success:function(data){
window.location.assign("cart");
},
error: function(data){
alert('Anda belum memilih ukuran');
}
});
};
Error:
event is not defined