struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <>
Subject Re: client-side validation not working
Date Fri, 13 Feb 2004 14:41:50 GMT
Everything looks OK to me.

Have you checked what javascript is being generated - use "view source" in
your browser when you are looking at the page. is there a
validateActivityViewForm() method and is that method doing the validations
you expect?

A second thought is how are you submitting your page - I had problems when I
was using javascript with a link tag. If your doing that, then try putting
an ordinary submit button on the page and see if that works.



----- Original Message ----- 
From: "Anderson, James H [IT]" <>
To: "Struts Users Mailing List" <>
Sent: Friday, February 13, 2004 2:23 PM
Subject: client-side validation not working

Server-side validation is working fine, but I can't seem to get client-side

I know I must be doing something wrong, but I can't figure out what it is

Here's a bit of the tile that uses validation:

<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>

<html:form action="/SelectActivity" onsubmit="return
    <TABLE border="0" cellspacing="0" cellpadding="0" align="center">
          <html:text property="starting" value="" size="10"/>
          <html:text property="ending" value="" size="10"/>
        <html:messages id="error">
          <TR><TD><FONT color="red"><STRONG><bean:write
<html:javascript formName="ActivityViewForm"/>

Here's the piece of validation.xml:


      <form name="ActivityViewForm">
          <arg0 key="ActivityViewForm.starting.displayname"/>
          <arg0 key="ActivityViewForm.ending.displayname"/>


Here's the Action entry from struts-config:


ActivityViewForm extends PortfolioForm which is declared thusly:

public class PortfolioForm extends ValidatorForm implements Serializable {

As I said, server-side validation is working fine, but the javascript on the
client-side isn't getting activated.

I hope someone can help me to resolve this quickly!

Thanks very much,


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message