It seems the "onclick" event overrides the submit action and hence your form
is not getting submitted. Instead of using "form:submit" use the "Button"
tag and in the "onclick" function put this code.

window.open('reconciliation.jsp','recwindow','width=800,height=600,resizable
=no,scrollbars=yes');
document.form[0].submit(); 
return false;



-----Original Message-----
From: JOEL VOGT [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05, 2001 8:39 AM
To: [EMAIL PROTECTED]
Subject: Re: Javascript and struts


Hi, 
I have this code:
<form:form action="logon.do" focus="username">
        Username: <form:text property="username" /><br>
        Password: <form:password property="password"/><br><br>
        <form:submit value="Logon"
                onclick =  
"window.open('reconciliation.jsp','recwindow','width=800,height=600,resi
zable=no,scrollbars=yes');return(false)"/>

</form:form>

This works in that it opens a new window and stops anything happening in 
the old window. The problem is, the form doesn't seem to be submitted, 
and the action is not called! Consequently, there is no login.
Any ideas?

Thanks, Joel.

Reply via email to