function afterSubmit(result){ hide("tst1"); if (result=='OK') { show("tst2"); location="upload.html"; } else{ show("tst3",2000); } }