{"id":236,"date":"2016-05-17T03:50:09","date_gmt":"2016-05-17T00:50:09","guid":{"rendered":"http:\/\/meekconsulting.com\/?p=236"},"modified":"2022-01-08T16:26:32","modified_gmt":"2022-01-08T13:26:32","slug":"keep-submit-buttons-from-submitting-twice","status":"publish","type":"post","link":"https:\/\/meekconsulting.com\/?p=236","title":{"rendered":"Keep submit buttons from submitting twice"},"content":{"rendered":"<p>Jquery One function works nicely for limiting a bind event to only one time.<\/p>\n<p>Just be sure to re-bind it ONE time when the server sends back an error when validating the form inputs.<\/p>\n<p><code>$objResponse->script(\" $('#submit_edit_prod_personalization_form').button().one('click',function() { xajax_update_prod_personalization(xajax.getFormValues('edit_prod_personalization_form')); });\");<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Jquery One function works nicely for limiting a bind event to only one time. Just be sure to re-bind it ONE time when the server sends back an error when validating the form inputs. $objResponse->script(&#8221; $(&#8216;#submit_edit_prod_personalization_form&#8217;).button().one(&#8216;click&#8217;,function() { xajax_update_prod_personalization(xajax.getFormValues(&#8216;edit_prod_personalization_form&#8217;)); });&#8221;);<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/posts\/236"}],"collection":[{"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=236"}],"version-history":[{"count":2,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/posts\/236\/revisions"}],"predecessor-version":[{"id":239,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/posts\/236\/revisions\/239"}],"wp:attachment":[{"href":"https:\/\/meekconsulting.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}