Solved

Struts form name

Posted on 2004-03-29
5
287 Views
Last Modified: 2013-11-24
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
Comment
Question by:ricjava
  • 3
  • 2
5 Comments
 
LVL 92

Expert Comment

by:objects
ID: 10710390
perhaps from your struts config file.
Have a look at the generate <form> tag in the html that is created.
0
 

Author Comment

by:ricjava
ID: 10710501
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
 
LVL 92

Accepted Solution

by:
objects earned 125 total points
ID: 10710650
yes
0
 
LVL 92

Expert Comment

by:objects
ID: 10711285
0
 

Author Comment

by:ricjava
ID: 10711333
thanks
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now