--- Sandeep Takhar <[EMAIL PROTECTED]> wrote:
> sorry David, but I accidentally deleted the thread
> that was started from my mail.
> 
> I think that having a final release of validator for
> release 1.0 of struts is a great idea.
> 
> One thing that you mentioned is that using bCancel
> as
> a javascript variable is optional.  How to do this
> using the 7/2/2001 release?
Optional means don't reference bCancle in the onlick
attribute.

> The code in JavaScriptValidatorTag.java in the
> getJavascriptBegin method adds this variable:
> 
>        sb.append("<!-- Begin \n");
>        sb.append("\n   var bCancel = false; \n\n");
> 
> Is it possible that when you make the final release
> --
> that you can make this compatible with the current
> nightly builds as well.  
I don't know what you mean.  The bCancel var was added
in June and hasn't been changed.

> 
> In the 7/2/2001 release one defines the buttons as
> follows:
> 
> <html:submit property="submit"
> onclick="bCancel=false;">
>          <bean:message key="button.save"/>
>       </html:submit>
>       &nbsp;
>       <html:reset>
>          <bean:message key="button.reset"/>
>       </html:reset>
>       &nbsp;
>       <html:cancel onclick="bCancel=true;">
>          <bean:message key="button.cancel"/>
>       </html:cancel>    
> 
> whereas in the nightly builds it seems like you need
> to define a separate function to handle the variable
> that you define:
> 
> <script language="javascript">
> <!--
> function submitForm(form) {
>   if (form.validate.value == "0") {
>     return true;
>   }
>   if (validateSimpleForm(form)) {
>     form.submit.value=" ..."; 
>     return true;
>   } 
>   else return false;
> };
> // -->
> </script>
> 
> and then define the buttons as follows:
> 
> <input type="hidden" name="validate"
> value="0"><html:submit
>
onclick="this.form.validate.value='1';">ENTER</html:submit>&nbsp;<html:cancel
>
onclick="this.form.validate.value='0';">CANCEL</html:cancel>

I don't know where you are seeing this in the
Validator examples.

David

> 
> Are my assumptions wrong?
> 
> You seem to have indicated that they are.  How can I
> get these two to be compatible with each other.
> 
> thanks for taking the time
> 
> - Sandeep
> 
> __________________________________________________
> Do You Yahoo!?
> Make a great connection at Yahoo! Personals.
> http://personals.yahoo.com


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

Reply via email to