function check()
{
var inputvalue = document.getElementById("item").value;
alert( inputvalue );
}
dont worry that it says get element by id. it actually checks both name and
id.
another way to do it is:
function check()
{
var inputvalue = document.getElementsByName("item")
Try the folowing:
function check(formId){
var inputvalue = formId.item.value;
alert(inputvalue);
return true;
}
Regards,
Sergey Smirnov
-
Exadel Struts Studio - IDE for Struts
http://www.exadel.com/strutsStudio
-
well, your check() function ought to return a boolean for starters.
function check() {
if (tests fail)
return false;
else
return true;
}
then,
onsubmit = "return check()"
-jeff
On Tuesday, June 3, 2003, a
I would check the HTML source and see what the "Name" attribute for the
textfield you are trying to access is set to.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 8:53 AM
To: [EMAIL PROTECTED]
Subject: JavaScript and text field
Hi,
I
4 matches
Mail list logo