Comments (4)
Yes, you can hook the wizard up to the form plugin to have it submit via AJAX. Branching based on AJAX calls is not currently supported, but it is a feature that can be added.
I'm still wrapping up the test suite and documentation for round 1 of this plugin, once that's finished I will see about adding asynchronous actions to the plugin.
from jquery-wizard.
Implemented in this commit: https://github.com/kflorence/jquery-ui-wizard/commit/2b0ad4f9b54b4c2d2231973a2c55928dd219338d
Have your action function return false and then later call the action method again with your response. For example:
someAction: function() {
var self = this;
$.ajax({
...
success: function( response ) {
self.select( response );
}
});
return false;
}
from jquery-wizard.
It seems to fully integrate this feature, I will need to add event queuing -- I have created a branch for this and will complete the work there. It will be available upon merge into the master branch.
from jquery-wizard.
Quick question to follow up on this async. I know this is old, but I'm using it anyways. I have a wizard going with a couple of transitions. Here is my code. Based on the result of servicelookup, I would like to go to a specific step. This doesn't work. What should I do?
<script type="text/javascript">
$("#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');
}
}
});
}
}
});
</script>
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
- Aync transitions and content 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.