I am trying to reload just a div once a function has been clicked and executed.
$('newThread').addEvent('submit', addThread);
function addThread(e){
e.stop();
var threadRequest = new Request.JSON({
url: 'control.php?action=createThread',
onSuccess: createThreadSuccess
}).post(this);
}
function createThreadSuccess() {
new Element('span',{
'text':'Post successful.'
}).inject($(threadList));
I have been using location.reload(true);
but am I correct in saying this will reload the whole page and not just the the div I am after?
Once the createThreadSuccess
has been executed I wish for the threadList div to reload, I have been using this link for advice but it doesn't seem to work in a jsFiddle
Please note I am using MooTools NOT jQuery