We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39515
    • 5 Posts
    Hi

    Is it possible to get Fileupload to work without refreshing the page? I'm using jquery to load FileUpload in a div (ImgUpDiv), the user selects the images and uploads them - all is working fine - but on a successful upload I would like the form/message to load inside the ImgUpDiv rather than refresh the page.

    I'm trying to fire a jquery form submit event to handle reloading into the ImgUpDiv by using a Javascript file include statement in the FileUpload tpl chunks to call the jquery but the Javascript include statement seems to be getting stripped out when the page first loads in the ImgUpDiv.

    Can anybody help me please?

    Ta very muchly

    I'm using MODX Revolution 2.2.0-pl2 (traditional) & fileupload-1.0.1-rc1
      • 39515
      • 5 Posts
      SOLVED

      I had a typo error in my jquery - DOH!!!!!!

      I used jquery .live() to get FileUpload to refresh in the required div:

      $('#ImgUpLoadBut').live('click', function()
      {
      $("#ImgUpLoadForm").ajaxForm(
      {
      target: '#ImgUploadDiv'
      }).submit();
      return false;
      });
        • 39515
        • 5 Posts
        SOLVED

        I had a typo error in my jquery - DOH!!!!!!

        I used jquery .live() to get FileUpload to refresh in the required div:

        $('#ImgUpLoadBut').live('click', function()
        {
        $("#ImgUpLoadForm").ajaxForm(
        {
        target: '#ImgUploadDiv'
        }).submit();
        return false;
        });