I am having problems calling the function callpage
Here is the code were I am trying to call the function. I got a label that when click I want to call callpage:
$('.gulemenu label, .payload label').toggle(function(){
$(this).find('input[type="checkbox"]').prop('checked',true);
$.(this).callpage();
}, function(){
$(this).find('input[type="checkbox"]').prop('checked',false);
$.(this).callpage();
});
$('.gulemenu input, .payload label').bind('click',function(e){ e.stopPropagation(); });
My callpage function:
function callpage() {
$('#formcontent').empty().html('<p style="margin-top:20px;text-align:center;font-family:verdana;font-size:14px;">Vent venligst, henter webhosts.</p><p style="margin-top:20px;margin-bottom:20px;text-align:center;"><img src="../images/ajax.gif" /></p>');
var form = $('form#search');
$.ajax({
type: form.attr('method'),
url: form.attr('action'),
data: form.serialize(),
success:function(msg){
$('#formcontent').html(msg);
}})
}
1 Answer