I get this Error when I click the button with the ID "#123" - I don't know what's the reason for this.
Code in my PHP File:
$("#123").click(function(){
getCheckedValues('oberpunkte', 'input:checkbox[class=oberpunkte]:checked', 'input[type=textfield]');
getCheckedValues('unterpunkte', 'input:checkbox[class=unterpunkte]:checked', 'input[type=textfield]');
ajaxCheckedValues('POST', 'selected.php', '#sumadd');
});
My JS Functions for the Code above:
function getCheckedValues(arrayname, selector, nextselector){
var array = arrayname;
array = new Array();
$(selector).each(function(){
array.push($(this).next(nextselector).val());
});
}
function ajaxCheckedValues(type, url, div){
var kategorie = ($("input:radio:checked[name='kategorie']").attr('class'));
$.ajax({
type: type,
url: url,
data: { oberpunkte : oberpunkte, unterpunkte : unterpunkte, kategorie : kategorie },
success: function (data)
{
console.log(data);
$(div).html(data);
}
});
}
Firebug Error:
I also alerted "kategorie" - it's not null. Any ideas?
HTML/PHP of Button and DIV:
echo("<input type='button' name='test' id='123' value='Checklist speichern'/>");
echo("<div id='sumadd' value=''></div>");
EDIT NOTE: Added HTML/PHP