Form Submit Request Reloads Page

Last post 12-07-2009, 9:59 PM by cutechat. 3 replies.
Sort Posts: Previous Next
  •  12-03-2009, 6:14 AM 57560

    Form Submit Request Reloads Page

    The multiple upload form works fine in my localhost but when I tried to upload it on a live server, after hitting the submit button, the whole page refreshes like ordinary form instead of loading the queued files through AJAX request.
     
    What could be the reasons why the whole page was reloaded like ordinary form?
     
    Please help.
    Filed under: ,
  •  12-03-2009, 6:30 AM 57561 in reply to 57560

    Re: Form Submit Request Reloads Page

    Hi,
     
    The most possible reason is that the script is not able to be downloaded.
     
    Please check the HTML code which server generated , and find out the script link , and check whether the URL is correct and have no server side error.
     
    Regards,
    Terry
  •  12-07-2009, 12:42 AM 57638 in reply to 57561

    Re: Form Submit Request Reloads Page

    cutechat:
    Hi,
     
    The most possible reason is that the script is not able to be downloaded.
     
    Please check the HTML code which server generated , and find out the script link , and check whether the URL is correct and have no server side error.
     
    Regards,
    Terry
     
    Hi, thanks for responding. I am not sure whether I understand on what you mean about the script not able to be downloaded? Can you please be more specific about this script? I've tried to upload the same files on other server and it worked fine.
     
    Here's what I got so far - I tried to view the script generated from the live server and my local server:
    Live server:
    Extensions='pdf' FlashLoadMode='1' MaxPartialSizeKB='102400' MaxHttpSizeKB='8192'    

    Local server
    Extensions='pdf' MaxHttpSizeKB='65536'
     
    Does that help? I mean, could this be one of the causes why the form fails?
     
    I tried to download all the files from that server (where form didn't worked as expected) and it went fine when running it on localhost. Is there a possibility that perhaps it runs on different servers maybe e.g. won't work on Windows servers (IIS)?
     
    How do I fix this? 
     
    Filed under:
  •  12-07-2009, 9:59 PM 57659 in reply to 57638

    Re: Form Submit Request Reloads Page

    Hi,
     
    Can you select files ?
     
    I think there must be some script error , which prevent the 'return false' to be executed, so the button submit the form.
     
    you can try :
     
    buttonsubmit.onclick=function()
    {
        try
       {
          //put the code here
       }
       catch(x)
       {
         alert(x.message);
       }
       return false; //return false to cancel submit..
    }
     
    Regards,
    Terry
View as RSS news feed in XML