{"action":"created","issue":{"url":"https://api.github.com/repos/braintree/braintree-web/issues/38","labels_url":"https://api.github.com/repos/braintree/braintree-web/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/braintree/braintree-web/issues/38/comments","events_url":"https://api.github.com/repos/braintree/braintree-web/issues/38/events","html_url":"https://github.com/braintree/braintree-web/issues/38","id":68795331,"number":38,"title":"Drop-In: No way for containing page to know when iframe fails client side validation","user":{"login":"tjgrathwell","id":1041691,"avatar_url":"https://avatars.githubusercontent.com/u/1041691?v=3","gravatar_id":"","url":"https://api.github.com/users/tjgrathwell","html_url":"https://github.com/tjgrathwell","followers_url":"https://api.github.com/users/tjgrathwell/followers","following_url":"https://api.github.com/users/tjgrathwell/following{/other_user}","gists_url":"https://api.github.com/users/tjgrathwell/gists{/gist_id}","starred_url":"https://api.github.com/users/tjgrathwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjgrathwell/subscriptions","organizations_url":"https://api.github.com/users/tjgrathwell/orgs","repos_url":"https://api.github.com/users/tjgrathwell/repos","events_url":"https://api.github.com/users/tjgrathwell/events{/privacy}","received_events_url":"https://api.github.com/users/tjgrathwell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-04-15T21:55:23Z","updated_at":"2015-06-08T17:53:03Z","closed_at":null,"body":"We have a form that contains user registration details as well as a braintree dropin frame.\r\n\r\nWe would like to disable the outer form's submit button after the user has pressed it once, so they can't double-submit.\r\n\r\nIf we disable the submit button, we need to re-enable it if the dropin iframe is showing an error (meaning the form did not actually submit).\r\n\r\nWe see that the `braintree.setup` for dropin can accept an `onPaymentMethodReceived` callback, which is a good way to know if the iframe submitted successfully.\r\n\r\nAdditionally, it seems to accept an `onError` callback. However, that does not seem to fire when the form is submitted but client side validation fails. I am not sure what circumstances trigger this `onError` event (probably if the iframe form submit failed when being sent over the network?).\r\n\r\n**In short**, any time the iframe has started doing work, we would like to have an event that tells us when the iframe has stopped doing work, successfully or unsuccessfully."},"comment":{"url":"https://api.github.com/repos/braintree/braintree-web/issues/comments/110091293","html_url":"https://github.com/braintree/braintree-web/issues/38#issuecomment-110091293","issue_url":"https://api.github.com/repos/braintree/braintree-web/issues/38","id":110091293,"user":{"login":"decadecity","id":1311389,"avatar_url":"https://avatars.githubusercontent.com/u/1311389?v=3","gravatar_id":"","url":"https://api.github.com/users/decadecity","html_url":"https://github.com/decadecity","followers_url":"https://api.github.com/users/decadecity/followers","following_url":"https://api.github.com/users/decadecity/following{/other_user}","gists_url":"https://api.github.com/users/decadecity/gists{/gist_id}","starred_url":"https://api.github.com/users/decadecity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/decadecity/subscriptions","organizations_url":"https://api.github.com/users/decadecity/orgs","repos_url":"https://api.github.com/users/decadecity/repos","events_url":"https://api.github.com/users/decadecity/events{/privacy}","received_events_url":"https://api.github.com/users/decadecity/received_events","type":"User","site_admin":false},"created_at":"2015-06-08T17:53:03Z","updated_at":"2015-06-08T17:53:03Z","body":"+1.  Could really do with this feature."}}