File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes get the form name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "get the form name" Watch "get the form name" New topic

get the form name

Gayatri Sinha
Ranch Hand

Joined: Feb 13, 2006
Posts: 34

I have a two forms

<form name="a" action="a.jsp" method="post">

and one more form
<form name="b" action="b.jsp" method="post">

and from these forms I am calling a javascript function that is written in a different file. In the function I want to get the name of the form "a" or "b".

Is it possible?

- Gayatri
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63858

Originally posted by Gayatri Sinha:
from these forms I am calling a javascript function

I have no idea what you mean by this. How are you calling a javascript function "from a form"?

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: get the form name
jQuery in Action, 3rd edition