Advertisement
Guest User

Untitled

a guest
May 9th, 2012
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. Double submission with `ajax:ajaxForm` in grails only if it is in `dialog()`
  2. <div id="newFoo">
  3. <ajax:ajaxForm controller="home" action="foo"
  4. id="fooForm" onSuccess="handleFooResponse"
  5. onError="showError">
  6.  
  7. <!-- some fields -->
  8.  
  9. <g:submitButton name="sub" value="store" />
  10. </ajax:ajaxForm>
  11. </div>
  12.  
  13. <form id="newFooForm">
  14. <div align="center" id="map" style="width: 400px; height: 250px">
  15. <br />
  16. </div>
  17.  
  18. <input type="submit" name="sub" value="store" id="sub" />
  19. </form><script type="text/javascript"> $("#newLocationForm").submit(function(event){ event.preventDefault();$.ajax({ type: "POST", url: "/web/home/newLocation", data: $(this).serialize(), success: handleNewLocationResponse, error: showError }); return false;});</script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement