reseting the submit button

  • Profile Image
    chiseled_images
    Asked on August 07, 2012 at 11:56 AM

    I have a page where a users fills out a form (ID=22089042791960) and clicks on submit.  This then open a new window () to display the table of data they request.  However when that window is close the original form is still showing 'please wait' and the submit button is in active. 
    How can I correct this to where the user presses the submit button, it loads the pop-up and resets to be a live button again.  It's more of an esthetic thing than anything else, but I want to look the best I can.

    thanks.

  • Profile Image
    jonathan
    Answered on August 07, 2012 at 04:11 PM

    Hi,

    Using your form http://www.jotformpro.com/form/22089042791960 does not reproduce this issue as it simply redirect to the custom thank you page ( http://chiseledimages.com/misc/test/return_order.php )

    However, since you used the form source code and implemented some custom scripts and functions using PHP, it is mostly likely that the issue you wanted corrected has something to do with the modifications done on the form source code.

    I did checked your order.php page further and try to find resolution, although my skill with PHP is limited. And here is what I have come up with.

    I tried adding a javascript code on the form submit button "onclick" event to refresh the index page.

    <script type="text/javascript">

    function reloadPage()

      {

      window.location.reload();

      }

    </script>

    on this form button code...
    <button id="input_2" type="submit" class="form-submit-button" onclick="reloadPage()">

    You can test my sample page here.

    I was able to test it on FF, Chrome and IE. But I do not have the correct source code of your page, so, it may not work as intended... but, it is always worth it to try.

    As I am not a PHP coder, my colleagues could easily improve on my resolution as they see fit.

    Hope this help. Please inform us of its results.

    Thanks.