I am a jquery newbie who is trying to use the jquery impromptu plugin to create an "ok/Cancel" button which does some validation before it submits. I currently have a working form which uses a standard javascript confirm prompt - but I want it to be fancier -smile. This is what I have - how do I convert it to the impromptu plugin? Thanks [code] in header javascript...
function CheckYears(form) { var year = form.elements['year[]']; var numyearSelected = 0; for (var i = 0; i < year.length; i++) { if (year[i].selected) numyearSelected++; } if (numyearSelected == 1 && year.selectedIndex==0) { return confirm('Are you sure you want to search on ALL Years?\r \nIt may take a while.\r\nClick "OK" to search or "Cancel" to start again.'); } } [/code] in body [code] form name="queryForm" action="test.php" method="POST" onSubmit="return CheckYears(this)"> <select name="year[]" multiple="multiple" size="12"> <option selected="selected" value="All">All Years</option> <option value="2007">2007</option> ... etc </selected> <input type="submit" name="submit" value="Search Availability"/> </form> [/code] I know it has something to do withthecallback function - but I can't get it to work...