Hi i am new comer for jquery. i am trying to upload a image with image description with help jquery ajax function. But when i am trying to upload image with text which contains some word with double apostrophe or single apostrophe like ( i am a "developer"). then image is not being upload by this code.
my code is -
<script type="text/javascript" src="<?php echo base_url(); ?>js/ajaxfileupload.js" ></script>
<script type="text/javascript">
$(document).ready(function(e) {
$('#make_giveyaar_posts_form').submit(function(e) {
e.preventDefault();
var baseUrl = $('#baseUrl').val();
var siteUrl = $('#siteUrl').val();
var img_dt = $('#img_dt').val();
e.preventDefault();
$.ajaxFileUpload({
type: 'POST',
url: siteUrl+'waller/save_give_yaar_postCL',
secureuri :false,
fileElementId :'img_u_ksb',
dataType : 'json',
data: {
'img_dt' : img_dt, 'cate_choosen': $('#cate_choosen').val()
},
success: function(data, status) {
if(data.status == "Success")
{
}
else
{
}
}
});
});
</script>
When I try to upload image without double quotes then it is being upload successfully but i try to upload with text , which contains some word with double apostrophe. Then is not being upload.
Please help me...............