On one page I load a list of people with a checkbox next to each. I want to move all the people I've selected to the next page. I'm trying to do this:
In this code below I check who is selected and add in the nips variable. This code works perfectly.
$(".check:checked").each(function(){
if($(".check:checked").is(':checked'))
{ var nip = $(this).parent().next( 'td' ).text();
nips.push(nip);
}
}) ;
Now in this code below I pass by post the nips variable (a vector).
This code works in part.
$.ajax({
type: "POST",
data: { nips:nips },
url: "../pdfporturma.php",
dataType: "html"
});
Why partly? Because it does not point to the other page (../pdfporturma.php). By firebug I see the correct result, showing the items in the vector all right, but I can not get to that other page by uploading this data.
Resposta do firebug:
array(1) {
["nips"]=>
array(2) {
[0]=>
string(8) "85808610"
[1]=>
string(7) "6506224"
}
}
How do I do it? I already tried window.open but it does not pass the data.