how to trigger on jquery smart wizard Finish button

0 votes

Iam very new in jquery. here is jquery from smart wizard:

/ Default Properties and Events
    $.fn.smartWizard.defaults = {
        selected: 0,  // Selected Step, 0 = first step
        keyNavigation: true, // Enable/Disable key navigation(left and right keys are used if enabled)
        enableAllSteps: false,
        transitionEffect: 'fade', // Effect on navigation, none/fade/slide/slideleft
        contentURL:null, // content url, Enables Ajax content loading
        contentCache:true, // cache step contents, if false content is fetched always from ajax url
        cycleSteps: false, // cycle step navigation
        enableFinishButton: false, // make finish button enabled always
        hideButtonsOnDisabled: false, // when the previous/next/finish buttons are disabled, hide them instead?
        errorSteps:[],    // Array Steps with errors
        labelNext:'Next',
        labelPrevious:'Previous',
        labelFinish:'Finish',
        noForwardJumping: false,
        ajaxType: "POST",
        onLeaveStep: null, // triggers when leaving a step
        onShowStep: null,  // triggers when showing a step
        onFinish: null,  // triggers when Finish button is clicked
        includeFinishButton : true   // Add the finish button
    };

})(jQuery);



<script type="text/javascript">
        $(document).ready(function() {
            // Smart Wizard         
            $('#wizard').smartWizard({
                onLeaveStep: leaveAStepCallback,
                onFinish: onFinishCallback
            });

            function leaveAStepCallback(obj, context) {
                debugger;
                alert("Leaving step " + context.fromStep + " to go to step " + context.toStep);
                return validateSteps(context.fromStep); // return false to stay on step and true to continue navigation 
            }

            function onFinishCallback(objs, context) {

                debugger;
                if (validateAllSteps()) {
                    $('form').submit();
                }
            }

            // Your Step validation logic
            function validateSteps(stepnumber) {
                debugger;
                var isStepValid = true;
                // validate step 1
                if (stepnumber == 1) {
                    // Your step validation logic
                    // set isStepValid = false if has errors
                }
                // ...      
            }
            function validateAllSteps() {
                debugger;
                var isStepValid = true;
                // all step validation logic     
                return isStepValid;
            }
        });
</script>

i need some functione for onFinish, where i can send request with many parameters. how to do it?

Jul 19, 2022 in Web Development by gaurav
• 23,260 points
2,125 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Web Development

0 votes
1 answer

How to Fade In/Out multiple texts using CSS/jQuery like on Droplr?

The jQuery fadeIn() method is used to ...READ MORE

answered Jun 29, 2022 in Web Development by rajatha
• 7,640 points
1,044 views
0 votes
0 answers

How to check radio button is checked using JQuery?

I have two radio buttons in one ...READ MORE

Jun 29, 2022 in Web Development by gaurav
• 23,260 points
294 views
0 votes
0 answers

How to make notices pop up as jquery on Ruby on Rails 4

I have a user controller with the ...READ MORE

Jul 28, 2022 in Web Development by gaurav
• 23,260 points
258 views
0 votes
1 answer

how to rotate image image 3d in jquery on swipe up and swipe down

If you're not using one of the ...READ MORE

answered Aug 4, 2022 in Web Development by rajatha
• 7,640 points
1,330 views
+1 vote
2 answers

How to embed Google map on my website?

1. Search whatever you want to embed. 2. ...READ MORE

answered Jan 17, 2020 in Web Development by anonymous
737 views
0 votes
1 answer

How to track with Google Analytics on a redirection page with PHP?

Hello @kartik, Since the page that is sending ...READ MORE

answered Jul 7, 2020 in Web Development by Niroj
• 82,880 points
1,588 views
0 votes
1 answer

jQuery AJAX submit form

There is a simple input mentioned below ...READ MORE

answered Feb 8, 2022 in Java by Soham
• 9,700 points
1,291 views
0 votes
1 answer

Microsoft CDN for jQuery or Google CDN?

You should absolutely use the Google CDN ...READ MORE

answered Jun 22, 2022 in Web Development by rajatha
• 7,640 points
466 views
0 votes
1 answer

How to use jquery with asp.net ajax?

If you weren't aware, Microsoft is planning ...READ MORE

answered Oct 15, 2018 in IoT (Internet of Things) by Annie97
• 2,160 points
538 views
0 votes
1 answer

Is 'sparkline' a method?

I suggest you to check 2 things That jquery.sparkline.js is actually ...READ MORE

answered Nov 9, 2018 in Apache Spark by Frankie
• 9,830 points
1,011 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP