RE: JavaScript and text field

2003-06-04 Thread Chen, Gin
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")

Re: JavaScript and text field

2003-06-03 Thread Sergey Smirnov
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 -

Re: JavaScript and text field

2003-06-03 Thread Jeff Kyser
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

RE: JavaScript and text field

2003-06-03 Thread Mike Jasnowski
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