Guest User

Untitled

a guest
Jan 17th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. function autoSave(){
  2. //alert('clled auto save function');
  3. console.log('Time duration check');
  4. var form = document.initPetitionerWizardForm;
  5. $.ajax({
  6. url: 'LoadPetitionerWizardPage1.do',
  7. dataType: 'json',
  8. type: 'post',
  9. contentType: 'application/json',
  10. data:$(form).serialize(),
  11.  
  12. success: function( ){
  13. console.log('success');
  14. },
  15. error: function( ){
  16. console.log( 'something wrong');
  17. }
  18. });
  19.  
  20. //e.preventDefault();
  21. }
  22. $(document).ready(function(){
  23. setInterval(autoSave,5000);
  24. });
  25.  
  26. <action path="/loadPetitionerWizardPage1"
  27. name="initPetitionerWizardForm"
  28. type="web.clerk.webapp.oop.action.LoadPetitionerWizardPage1Action">
  29. <forward name="FAILURE" path="/Home.jsp" contextRelative="false"/>
  30. <forward name="SUCCESS" path="/PetitionerWizard1.jsp" contextRelative="false"/>
  31. </action>
Add Comment
Please, Sign In to add comment