Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 305
  • Last Modified:

Struts form name

I'm new to struts

Can anyone tell me why a form which has no name can be referred to by a name. For eg

.
.
function okClick(){
        if(validateLoginForm(document.loginForm)){
            document.loginForm.action.value = "signinto";
            document.loginForm.submit();
        }
.
.
<html:form action="/loginAction.do">
..
..
..
..
</html:form>

Nowhere I saw the name of form been given.
How does the form get the name of loginForm as shown in Javascript?

Pls help.
0
ricjava
Asked:
ricjava
  • 3
  • 2
1 Solution
 
objectsCommented:
perhaps from your struts config file.
Have a look at the generate <form> tag in the html that is created.
0
 
ricjavaAuthor Commented:
I saw

<form-bean name="loginForm" type="my.com.webportal.common.formbean.LoginForm"/>


in the struts config file

Is it where the form gets its name of loginForm?
0
 
objectsCommented:
yes
0
 
objectsCommented:
0
 
ricjavaAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now