You will need to add javascriptFieldsArray dbform attribute. e.g.

          <db:dbform followUp="/SystemCategory/SystemCategory.jsp"
               maxRows="1"
                    tableName="SystemCategory"
                                javascriptFieldsArray="true"
                    autoUpdate="false">


> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: 08 August 2002 13:09
> To:   [EMAIL PROTECTED]
> Subject:      [dbforms] dbforms question:about javascriptValidation
> 
> 
> 
> 
> hi,
>    I want to ask a question about javascriptValidation.
>    I want valid the field of dbform in the jsp;
>      but when I use method getDbFormFieldName() I have encounted a
> problem:there
> is lack of object,
>         I want to know how to use the method getDbFormFieldName(),or
> before
> using it must declare something?
>    my code as follow:
>           <%@ page contentType="text/html;charset=GB2312" language="java"
> %>
>           <%@page import="java.util.*,java.text.*"%>
>           <%@ taglib uri="/WEB-INF/dbforms.tld" prefix="db" %>
> 
>           <db:base/>
> 
>           <db:dbform followUp="/SystemCategory/SystemCategory.jsp"
>                maxRows="1"
>                     tableName="SystemCategory"
> 
>                     autoUpdate="false">
>                <db:header>
>                </db:header>
>                <db:errors/>
>                <db:body>
>                     <table width="100%" border="0" cellspacing=0>
>                          <tr bgcolor="#FFFFCC">
>                               <td width="30%"
> bgcolor="#FFFF99">CategoryID:
>                                    <font color="red">*</font>
>                               </td>
>                               <td>
> 
>                                    <db:textField size="10" maxlength="10"
> fieldName="CategoryID"/>
>                               </td>
>                          </tr>
> 
>                     </table>
>                     <center>
>                                    <db:insertButton caption="insert"
> onClick="
> insertCheck();"/>
>                     </center>
>                </db:body>
>                <db:footer>
> 
> 
> 
>                 </db:footer>
>           </db:dbform>
> 
> 
> <script language="javascript">
>    function insertCheck()
>    {
>      var CategoryIDName = getDbFormFieldName("CategoryID");
>      var CategoryID = document.dbform[CategoryIDName];
>      strId=new String(CategoryID.value);
>      alert(strId);
>    }
> </script>
> 
> =============================================================
> 
> help me!
> 
> Best Regards
> 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

Reply via email to