I got the answer. I was using "submit" as the property value.
Changed it to something else and it works.... -----Original Message----- From: Ramaiah, Sunil [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 06, 2005 11:16 AM To: user@struts.apache.org Subject: Javascript with <html:button> gives document.forms[0].submit not a function error Hi I have a Java Script code like this - function displayRemovePackageMessage( ) { returnValue = confirm("You are about to permanently remove this package."); if( returnValue == true ) { alert(document.forms[0].name.value); document.forms[0].submit (); } else { return returnValue; } } I call this java script function from the struts code - <html:button property="submit" onclick='javascript: displayRemovePackageMessage (document.forms[0])'> <bean:message key="mf.common.remove" /> </html: button > I am getting the javascript error - document.forms[0].submit is not a function Any clues ? Thanks, Sunil. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]