Created
March 22, 2016 10:10
-
-
Save hsleonis/2b0784292602d6fae48f to your computer and use it in GitHub Desktop.
Dynamic content in Bootbox JS with AJAX request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bootbox.dialog({ | |
title: "This is a AJAX Form from external file.", | |
data: {'user':'dc','task':'get'}, | |
datauri: 'ajax.html', | |
buttons: { | |
success: { | |
label: "Save", | |
className: "btn-success", | |
callback: function () { | |
var name = $('#name').val(); | |
var answer = $("input[name='awesomeness']:checked").val() | |
Example.show("Hello " + name + ". You've chosen <b>" + answer + "</b>"); | |
} | |
} | |
} | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment