Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Struts form name

Posted on 2004-03-29
5
295 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

840 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