Here after uploading an image if anyone want to remove the uploded image that part is not working.can anybody help me how to remove image after uploading with ajax
Post Date: Jul 06, 2009 12:37:45
Asif D. Khalyani says:
Comment:
Hi, chaitali debnath
You can remove function image path to call ajax function delete those image, very easy.
Post Date: Aug 26, 2009 10:39:58
virk6 says:
Comment:
Hello, Please, can you give us the source code of the ajax function to delete an image and also a function to refresh the frame after the delete completes ..
Thanks you very very much ..
Post Date: Oct 12, 2009 12:21:25
Asif D. Khalyani says:
Comment:
On Oclick you can call delete function call & remove that image easily
Post Date: Oct 18, 2009 09:41:53
virk6 says:
Comment:
Mr Asif D. Khalyani, have you tried this delete function to remove image easily ?? It is not working at all and you get this error message : x Y: usrname.. If you have the code source that works well please let me know.
Thanks.
Post Date: Oct 23, 2009 04:58:06
pusp says:
Comment:
please append delete only in client side after the remove btn thanks
Post Date: Oct 30, 2009 10:55:26
virk6 says:
Comment:
Please, what do you mean by "append delete only in client side after the remove btn" ? which the source code you call client side after the remove btn ?
To resolve this problem can you give me the piece of the code source ?
Thanks you very much..
Post Date: Jan 01, 2010 05:41:19
Bengt says:
Comment:
Hi Asif D. Khalyani says
I don´t now where or what to change in upload script to get the remove function to work.
Could you please help me with the problem.
I´m not so good in programming.
Regards
Bengt
Post Date: Jan 16, 2010 02:04:28
ilker says:
Comment:
remove function won't work....
Post Date: Jan 16, 2010 06:28:56
pioter says:
Comment:
can you help with delete function?
Post Date: Jan 28, 2010 12:14:01
Asif D. Khalyani says:
Comment:
//Upload.php page line No:33
This Code Here --------------------------------------------------------------- var myLink1 = par.createElement('a'); myLink1.href = "#"; myLink1.className = "blacklink"; ============================================== /*myLink1.onclick=function(e){alert('x'+' Y: '+'usrname');} */
//We Can Call Here Delete Function Above Line Delete or Comment like this //I am writing for delete function call here
myLink1.onclick=function(e){delete_image('id');} // I am calling function with image id passed
/**** DELETE Image Function delete_image.js this one add in your main index page***/ function delete_image(image_id) { var data; data="image_id="+image_id; var url = '../script/delete.php'; // Call Delete Page & In this page delete those image & db entry var myAjax = new Ajax.Request(url,{method:'post', parameters: data, onComplete: delete_image_Changed} ); return false; }
function delete_image_Changed(originalRequest) { if (originalRequest.readyState==4) { //alert(originalRequest.responseText); if(originalRequest.status==200) { response = originalRequest.responseXML.documentElement;
var str; var divid; var d_id; var result_flag; try { result_flag = response.getElementsByTagName('result_flag')[0].getElementsByTagName('result')[0].firstChild.nodeValue; if(result_flag == "true") { alert('Image Not Delete'); } else { alert('Image Deleted'); }
}catch (e) {
} } else { alert("There was a problem retrieving the XML data:\n" + req.statusText); } } }
Here after uploading an image if anyone want to remove the uploded image that part is not working.can anybody help me how to remove image after uploading with ajax