Can we please stop suggesting use of the form name? It.will.not.work. If
both forms have the same name, it makes a reference to document.forms['foo']
an array and not a reference to the form. Of course you *could *do this:
<html>
<head>
</head>
<script language="JavaScript" type="text/javascript">
function tellMe(){
alert("Form 1: " + *document.forms['foo'][0].form2Text.value*);
alert("Form 2: " + *document.forms['foo'][1].form2Text.value*);
}
</script>
<body>
<form action="foo" method="post" name="foo" id="foo">
<input type="text" name="form2Text" value="This is 1">
</form>
<form action="bar" method="post" name="foo" id="bar">
<input type="text" name="form2Text" value="This is 2">
</form>
<input type="button" name="myButton" value="Click It" onclick="tellMe();">
</body>
</html>
but A, that would be stupid, and B, you have to use the index value anyway.
On 8/1/06, kalpesh modi <[EMAIL PROTECTED]> wrote:
I am not sure whether
document. form['formName'] will work or not. Give it a try.
-Kalpesh
---------------------------------
Yahoo! Music Unlimited - Access over 1 million songs.Try it free.