-1

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...............

4
  • It's more likely for this to be an issue with the plugin itself, or with the php file handling code.
    – Kevin B
    Commented Mar 18, 2014 at 17:14
  • @Kevin B, Please help me sir, this issue like -stackoverflow.com/questions/20935544/… Commented Mar 18, 2014 at 17:16
  • Is that question yours too?
    – Kevin B
    Commented Mar 18, 2014 at 17:20
  • If you read the documentation for this plugin, you will see that it is specifically built to only submit a file, not a file + some other values. Find another plugin.
    – Kevin B
    Commented Mar 18, 2014 at 17:22

1 Answer 1

1

This plugin cannot submit anything other than a single file input. If you need more than that, find another plugin.

Ref: http://www.phpletter.com/our-projects/ajaxfileupload/

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.