39
rated 0 times
[
42]
[
3]
/ answers: 1 / hits: 46488
/ 11 Years ago, tue, may 28, 2013, 12:00:00
I wanted to get a img src to php variable when a user clicks it so i used jquery function to get img src when user clicks that image.Below jquery is for fetching img src
$(img).click(function() {
var ipath = $(this).attr('src');
})
now i tried something like this to get the ipath value to php variable
$.ajax({ type:'POST', url: 'sample.php',
dataType: 'HTML', data: dataString,
success: function(data)
{
}
});
});
I'm not sure about using Ajax correctly can anyone help with Ajax function to get this done?
Thank you.
More From » php