I am trying to load my Perl CGI script's content into the HTML page. .load()
does not work. Please tell me what's wrong here:
$(document).ready(function() {
$('input:checkbox').change(function() {
var nom = $(this).attr("value");
if ($(this).is(':checked')) {
alert('okok');
$('body').load("../cgi-bin/essai.pl");
} else {
//$("#" + nom).remove();
}
});
I would like:
- When I check the checkbox (which has as value "toto") load (in Ajax) essai.pl?param=toto
- When I uncheck this checkbox, remove the content loaded before.
Hope someone has a little time to help me to leave this jQuery nightmare.
Bye.