A rough assumption of what you want:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="jquery-impromptu.js"></script>
<link rel="stylesheet" media="all" type="text/css" href="jquery-impromptu.css" />
<form id="frm">
<input type="text" name="name" id="name" />
<input type="submit" />
</form>
<script type="text/javascript">
$(function(){
$("#frm").on('submit', function(e){
if($("#name").val() == ""){
showPrompt('Please insert name', 'this is the title');
$("#name").focus();
e.preventDefault();
}
})
function showPrompt(msg, title){
$.prompt(msg, {
title: title
});
}
});
</script>