I’ve been twiddling with the next version of Impromptu and just wanted to get some feedback on my todo list and see if there are any other good suggestions for the upcoming version. Here’s where I stand so far:
- Add <iframe src=”javascript:false;” style=”display:block;position:absolute;z-index:-1;” similar to bgiframe.
- Keep from tabbing/clicking outside of the prompt. BlockUI seems to do this.
- Update documentation site. It needs a refresh bad, but there’s only 24 hours in a day..
I will keep this as a running list and I will try to update this post with new thoughts. Please feel free to suggest anything.
Related posts:


12 Responses
Jon Anderson
20|May|2009 1I really love impromptu, but can’t figure out how to get one of the buttons to redirect a user to another page. I’m a JS noob but impromptu has me learning at a fast rate because I want to use it so badly :)
Keep up the good work!
trent
20|May|2009 2Hey Jon, glad you’re enjoying Impromptu. This is pretty easy to accomplish. I’ll pretend you have a button called “Go” and one called Cancel”.
$.prompt(‘Do you want to redirect?’{
buttons: {Go:true, Cancel:false}, //these dont have to be true/false
callback: function(v,m,f){
if(v == true){ //here we’ll check for the value of our Go button
window.location = “http://google.com”;
}
}
});
Hope that helps!
Jon Anderson
20|May|2009 3nice! Thank you….I’ll give it a shot and get my donation ready :)
Jon Anderson
20|May|2009 4Dern’d, can’t get it to work. Here’s my current code: what did I miss? I imagine it’s something ridiculous :)
function load()
{
$.prompt(‘Are you able to sign in to your account?You\’ll need to sign in to submit a support ticket.’,{ buttons: { Yes: true, No: false },
callback: function(v,m,f){
if(v == false){window.location = “page.html”;
}
}
});
trent
20|May|2009 5Not sure if you copied all the code but looks like you’re missing a closing bracket on your load(). if that doesn’t work are you able to see the prompt at all? or does it error before you see anything?
trent
20|May|2009 6function load()
{
$.prompt(“Are you able to sign in to your account?You’ll need to sign in to submit a support ticket.”,{
buttons: { Yes: true, No: false },
callback: function(v,m,f){
if(v == false){
window.location = “page.html”;
}
}
});
}
Also be careful copying from the blog here, it may replace ” and ‘ with html characters. Just be sure to check that they’re pure text when you past into your source code.
Jon Anderson
20|May|2009 7There’s no error; nothing happens. It actually worked great before I made the most recent changes, so it must have not noticed if I was missing something.
So the above looks correct, but missing a bracket? Where might that bracket be added?
Jon Anderson
20|May|2009 8Bah, we were posting at the same time :)
Works great now, thanks again!
Ian
20|May|2009 9Hi – Nice work on Impromptu. Can’t figure out how to get it to close with a fade on a timeout. Easy enough to just set
var close=setTimeout(“jQuery.prompt.close()”,10000);
but I am really looking for a fade effect. Perhaps it’s in there and I am being dense?
Ian
20|May|2009 10Closing on a click OUTSIDE the main dialog might be good too?
trent
20|May|2009 11Ian,
I’ll try to add that as an option(click fade to close – true/false). To make it fade out you can change the “show” to “fadeIn” option. Take a look at example 6 in the docs:
http://trentrichardson.com/Impromptu/index.php
Евгений
03|Jun|2009 12Браво! Вы ребята как телепаты. Два дня назад искал что-то подобное, и как всегда нашёл здесь. СПАСИБО!!!!
Leave a reply