makeusabrew/bootbox — pull request #306 by gomacgregor (2014-09-05 21:30:36+00:00)
Title: example as requested

bootbox makes dynamic dialogs simple

var dstring = document.getElementById("hiddendialogues").value;
dialogues= dstring.split(",");

if (dialogues.length < 2)
{
window.location ="week.php?m="+startstring;
}
else
{
var dstart= "

all dialogues

";

for (var i = 0; i < dialogues.length; i++)
{
dstart=dstart+"

"+dialogues[i]+"

";
}

bootbox.dialog({
title: "choose a dialogue to load in your weekly view",
message: '

' +
'

' +
'

' +
dstart +
'

' +
'

',
buttons: {
success: {
label: "go to week",
className: "btn-success",
callback: function () {
window.location ="week.php?m="+startstring+"&l="+$("input[name='dialogues']:checked").val();
}
}
}
}
);