/* * --------------------------- * functions for the examples * --------------------------- */ function mycallbackfunc(v,m,f){ jQuery.prompt('i clicked ' + v); } function mycallbackform(v,m,f){ jQuery.prompt(v +' ' + f.alertName); } function mysubmitfunc(v,m,f){ an = m.children('#alertName'); if(f.alertName == ""){ an.css("border","solid #ff0000 1px"); return false; } return true; } jQuery.fn.extend({ myanimation: function(speed){ var t = jQuery(this); if(t.css("display") == "none") t.show(speed,function(){ t.hide(speed,function(){ t.show(speed); }); }); else t.hide(speed,function(){ t.show(speed,function(){ t.hide(speed); }); }); } }); var txt = 'Please enter your name:
'; var txt2 = 'Try submitting an empty field:
'; var brown_theme_text = '

Example 13

Save these settings?

help'; var statesdemo = { state0: { html:'test 1.
test 1..
test 1...', buttons: { Cancel: false, Next: true }, focus: 1, submit:function(v,m){ if(!v) return true; else jQuery.prompt.goToState('state1');//go forward return false; } }, state1: { html:'test 2', buttons: { Back: -1, Exit: 0 }, focus: 1, submit:function(v,m){ if(v==0) jQuery.prompt.close() else if(v=-1) jQuery.prompt.goToState('state0');//go back return false; } } };