Comments (2)
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.
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)
- Disable Submit Button After Click HOT 1
- Destroy/initiate issue HOT 8
- ignore of validate HOT 1
- Multiple questions require branches
- Branch error messages HOT 1
- Responsiveness Support HOT 4
- Validation doesn't work in presence of labels HOT 2
- How to dynamic create steps HOT 2
- .on not supported in jQuery 1.6 HOT 5
- hide or show step dynamically HOT 2
- History back() support ? HOT 1
- Issue Adding to Wordpress HOT 2
- Reset Wizard? HOT 1
- Question HOT 5
- Input disappeared in multiple nested branches in a single page
- Check for step's controls validity before calculating transition
- How can i skip step ?
- How can I add another submit button for "Save and finish later"
- How can I have 3 working submit buttons with different names? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-wizard.