struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravi_eze <>
Subject wrong request parameters sent
Date Mon, 31 Dec 2007 07:35:24 GMT


i have 3 checkboxes(c1,c2,c3)  enclosed in a form (theme: ajax;
validate=true). I am trying to get the validation done by ajax and when i
un-check all boxes or check some of the boxes i see that always c3 is being
set in request parameter.

when i tried to debug i found the following statement in validationClient.js
which could be a cause of this behavior:

		var vc = this;
		var form = input.form;
		var params = new Object();
	    for (var i = 0; i < form.elements.length; i++) {
	        var e = form.elements[i];
            if ( != null && != '') {
                params[] = e.value;

which is always putting the 3rd checkbox in the request parameter even
though its not checked. If i remove all ajax related attributes (i.e.
<s:head, <s:form.. ) the parameters are going right and the validations are
happening fine. 

any ideas where i am going wrong/ is any body else is also getting the same

View this message in context:
Sent from the Struts - User mailing list archive at

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

View raw message