Try
<db:insertButton caption="insert" onClick="return insertCheck();"/>
> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: 11 August 2002 04:19
> To: [EMAIL PROTECTED]
> Subject: [dbforms] dbforms question :about event of db:insertButton
>
>
>
> hi,I want to ask a question about event of db:insertButton
> However I use "return false" in function of insertCheck which is the
> onClick
> JavaScript event of insertButton ,
> the dbform also insert the record into database.
>
> How can I stop inserting?
>
> <db:insertButton caption="insert"
> > onClick="
> > insertCheck();"/>
>
> > <script language="javascript">
> > function insertCheck()
> > {
> > var CategoryIDName = getDbFormFieldName("CategoryID");
> > var CategoryID = document.dbform[CategoryIDName];
> > String strId=new String(CategoryID.value);
> > alert(strId);
> document.dbform[CategoryIDName].focus();
> document.dbform[CategoryIDName].select();
> return false;
> > }
> > </script>
>
> Best Regard
> Sandy
>
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> DbForms Mailing List
>
> http://www.wap-force.net/dbforms
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
DbForms Mailing List
http://www.wap-force.net/dbforms