Hello,

I have the following Ajax request:

PHP Code:

    
// store reference to the form
    
var $this = $('form#loginform');

    
// grab the url from the form element
    
var url $this.attr('action');

    
// prepare the form data to send
    
var dataToSend $this.serialize();

    
// the callback function

    
var callback = function(data){
    
       
document.getElementById('response').innerHTML data
    
};

    
// now send the form and wait to hear back
    
$.geturldataToSendcallback'html' 
When I change:
PHP Code:
document.getElementById('response').innerHTML data 
to:
PHP Code:
document.getElementById('response').innerHTML url 
Or:
PHP Code:
document.getElementById('response').innerHTML dataToSend 
etc.

All is well, and the div contains either the contents of the form or the correct url etc. So I know the variables are working and storing correctly, but when I actually run it, the div either declares undefined, or remains blank..

All help is appreciated.