-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can use confirm box to submit the form? #192
Comments
Check this JSFiddle from Stephan: http://jsfiddle.net/StephanWagner/cn4921bf/1/ In short: you add an EventListener to the form and on submit trigger the confirmation dialog via jBox. |
The code sample sent has a problem and does not work! |
The solution is written above: add an Eventlistener to your form(s) and trigger the confirmation box. The JSFiddle shows the idea of the code. A bit of coding yourself is required. |
My scenario is that by giving a specific class "subForm" to each form, it will give a message before submit, and after confirmation, the form will be submitted in the default form. |
The fiddle doesn't work because it loads the assets from an old CDN library. As @despecial said, you just have to rewrite the code a little bit to use it with multiple form. That would be one way if you like to use ajax: http://jsfiddle.net/wz9mcf36/ Without ajax, change the button from submit to a normal button and handle the submit manually, like so: http://jsfiddle.net/StephanWagner/f4zeu8pw/ |
Thank you dear for your help, I am not very skilled in javascript but what I want is similar to the code below, actually I want to access the target form that is being submitted in the confirm properties in the jbox object So that I can submit it.
|
Hi
How can use confirm box to submit the form?
The text was updated successfully, but these errors were encountered: