..or more modules you must have seen the iframes used for realtime result display. In this tutorial I'm going to show you how to insert them into your module and how they function. what..
THC Sscan is a very versatile tool for scanning (html) files
/* get the name of the folder and display it */
$(document).on("click","input.editpath",function(e){
e.preventDefault();
dataString = $("form.pathform").serialize();
$.ajax({
type: "POST",
url: "JSON/path_edit.php",
data: dataString,
dataType: "json",
beforeSend:function(){
$('input[type="submit"]').attr('disabled','disabled');
},
success: function(json){
if(json.jresult==false){
$('input[type="submit"]').removeAttr('disabled');
alert(json.jmessage);
}
else{
$('div.clear#pathnames').after('<div class="cc_record" id="editname"><div class="flt pad3 w150"><b>old folder</b></div><div class="flt pad3">'+json.jfolder+'</div></div><div class="clear"></div>');
$('div.clear#pathnames').append('<div class="cc_record" id="editname"><div class="flt pad3 w150"><b>new folder</b></div><div class="flt pad3"><input type="text" name="sNewName" value="'+json.jfolder+'" /></div></div><div class="clear"></div>');
$('input.editpath').after('<input type="submit" name="submit" class="changename" value="Change" />');
$('input.editpath').remove();
}
}
});
});
/* send folder change request to json file */
$(document).on("click","input.changename",function(e){
e.preventDefault();
dataString = $("form.pathform").serialize();
$.ajax({
type: "POST",
url: "JSON/path_edit.php",
data: dataString,
dataType: "json",
beforeSend:function(){
$('input[type="submit"]').attr('disabled','disabled');
},
success: function(json){
if(json.jresult==false){
$('input[type="submit"]').removeAttr('disabled');
alert(json.jmessage);
}
else{
$('form.pathform').hide('slow');
$('form.pathform').after('<div class="cc_summary emboss borderr5 border1pxtrans pad5 edgeglow"><div class="embosshdrnocenter border1pxtrans pad5">RESULT</div><div class="cc_record"><div class="flt pad3">'+json.jmessage+'</div></div></div><div class="clear"></div>');
}
}
});
});