Giter Site home page Giter Site logo

Comments (2)

casey1701 avatar casey1701 commented on September 23, 2024

Hello Ant5,

Did you ever figure this out? I am using it for a wizard order form. I've made an async call. I get a result and have conditions but I can't go to the needed next step. See my code below. Where it says return sorry, or return internet. It's not doing it. Do you know of a way for me to send the wizard to the right step?

				$("#wrapped").wizard({
					transitions: {
						choosetv: function( $step, action ) {
							var tvchoice1 = $step.find("[name=tv_choice]:checked").val();
							if(tvchoice1 == 'Starter TV - $45/mo'){ return 'additionaltv'; }
							if(tvchoice1 == 'Advanced TV - $110/mo'){ return 'additionaltv'; }
							if(tvchoice1 == 'No TV - $0.00'){ return 'end'; }
						},
						servicelookup: function( $step, action ) {
							var service_address=$("#service_address").val();
							$.ajax({
								type:'post',
									url:'check_service_address.php',
									data:{service_address: service_address},
									success:function(data){
										if(data == 'not_in_list\r\n'){ 
										console.log("sorry");
										return 'sorry';
										}
										if(data == 'in_list\r\n'){ 
										console.log("congratulations"); 
										return 'internet';
										}
									}
							});
							
						}
						
					}
				});

from jquery-wizard.

kflorence avatar kflorence commented on September 23, 2024

Hello @casey1701 @ant5 -- sorry I missed this original question. The action method can be used to provide the correct result when using asynchronous transitions, see the example here: https://github.com/kflorence/jquery-wizard/blob/master/tests/unit/wizard/wizard_options.js#L179

By the way, in general you will probably get better/faster responses if you ask these questions in Stackoverflow, since I generally don't check here often except for bugs.

from jquery-wizard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.