hi,
i have one textbox and one save button, i have added attribute at page
load event
btnSave.Attributes.Add("onclick","return ValidateForm();");
in validationform() ,I have written like this
if(--some validation function here--)
{
----------------
return false;
--------------
}
if(window.confirm ('Are you sure to Save ?'))
return true;
else
return false;
at .aspx page i am writing
<asp:textbox id="txtCompAdj" Runat="server"
onblur="cspFormat(this,30,8,'');return false;"></asp:textbox>
now the problem i am facing that suppose cspFormat returns false(means
some error) then in that case i am getting the prompt "Are you sure to
Save ?"
i.e. the execution sequence is when we press enter key
1) validateForm()
2) cspformat(----)
if i press the button by mouse then the execution sequence is just
reverse which is perfectly write and dont provide "Are you sure to Save
?" prompt if there is any error(return false) in cspformat(---)
so what should i do to get the proper execution sequence at enter press
event as i get at mouse pree event