I have been trying for 3 hours to get my Alertify JS code to work. I need these functions to go right after each other and to make the answer to the prompt a global variable that I can use in another function. What happens when I run it is it does the first prompt, but i doesn't do any of the other ones. I am still new to coding an I bet I did something dumb. This is what I have.
function appchange() {
alertify.prompt("Enter the number of the app you want to change. From left to right, 1-5.", ' '
, function(evt, a) { numb = a;
linkURL();
});
}
function linkURL() {
alertify.prompt("Enter the link you want the app to go to.", 'https://'
, function(evt, b) { url = b;
iconHTML();
});
}
function iconHTML() {
alertify.prompt("Enter the html of the icon from fontawesome.com/icons or you can use a capitol letter. CAN NOT BE A PRO ICON!", ' '
, function(evt, c) { icon = c;
finish();
});
}
function finish() {
}
If anyone can fix what I am doing wrong, that would be awesome. Thanks!