RE: Any idea why this form is not being submitted.

2001-08-30 Thread Kevin Hinners

You need to give your form a name:



If specifying the form name through the struts-config.xml properties file,
you should use that name instead. For example,




In your JavaScript put:

myForm.submit();

JavaScript is trying to tell you that it doesn't know what object "entity"
is.


Kevin Hinners
Senior Technical Analyst

FedEx Services
350 Spectrum Loop
Colorado Springs, CO 80921
719-484-2303
[EMAIL PROTECTED]


-Original Message-
From: Alex Colic [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 30, 2001 2:35 PM
To: Struts
Subject: Any idea why this form is not being submitted.



Hi I have a form that has one text box tied to a form bean 'entity' and a
couple of text boxes that the user can input search criteria and bring up a
search page. The problem I am having is the form page is not being
submitted.

If they hit a search button I call a function and submit the form.

A snippet of my page is:


  


  


funciton doSearch(criteria)
{
 
 alert(entity.txtSearchEntityName.value);
 entity.submit();//error line
}



When I tab out of the search box, I keep getting an error that this object
does not support this method or property yet I can print out the text in the
search text box.

I can't seem to find the error.

Any help is appreciated.

Alex




RE: How to make reset button clear all fields

2001-08-30 Thread Kevin Hinners

The Reset button is working the way the HTML specification has it defined
just as you described. It only resets the fields that have changed since the
page was displayed. In order to work around this problem, I created a
ResetAction class that gets called when you click on the reset button. This
class either disposes of the FormBean or clears the attributes and posts
back to the form page. Hope this helps.

Kevin Hinners
Senior Technical Analyst

FedEx Services
350 Spectrum Loop
Colorado Springs, CO 80921
719-484-2303
[EMAIL PROTECTED]


-Original Message-
From: Kwang-Shi Shu [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 30, 2001 10:33 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: How to make reset button clear all fields


 I noticed the following behavior for "RESET" button in "STRUTS" framework:

The Reset button will clear all fields on the first try. After that, if
you encountered validation errors, it seems to remember what have been
so far. From that point on, the "reset" button only clears the new
input values. Case in point -- try the "struts-example" login.jsp and
you know what I am talking about.

  What should I do if I still want to clear all field contents. I tried to
use
another button declared as "" and it is not working
either.

Shu, Kwang-shi  | Tel 732-460-7848
Village Networks, Inc.  | Fax 732-460-9851
246 Industrial Way West |
Eatontown, NJ 078724| email: [EMAIL PROTECTED]