.ajax wierd behavior with data option
Hello,
I am an intermediate user of jquery and I am experiencing a really weird behavior with a page on my site when i try to attach an event handler to a button.
The functionality of the button is to make a request with .ajax.
As long as I do not include the data { key: value } option everything "works" properly but as soon as i add it an error executes.
i tried every single possible way using data: string, value & key pairs.
Here is the code as it is now:
$("a#ButtonBack").unbind('click').click( function() {
$.ajax({
type: "GET",
dataType: "html",
url: 'index.php',
data: { Test: true },
success: function(data)
{
alert( data );
}
});
return false;
} );
Thank you in advance for helping me out.
Sasha