Hi Spencer,
 
I'm checking through my code and unless my return statement is in the wrong place, it didn't fix my problem.  Below is my code:
 
 
<%
    String value = "if (!confirm('Are you sure you want to remove " + TITLE + "?')){return;}; ";
%>
<html:form action="/removeTitle.do" onSubmit="<%=value%>"> 
<html:hidden property="movieID" value="<%=MOVIEID%>"/> 
<html:submit property="ViewTitles">Remove</html:submit>
</html:form>
 
 
Also, have you had any problems with struts defining weird sizes on your table rows?  My row heights are unusually high, and I haven't set the size.
 
Thanks for your help!
 
Steven
 
----- Original Message -----
Sent: Thursday, May 31, 2001 11:06 PM
Subject: Re: Using Javascript to cancel submit?

That is because you do not have a "return" specified on the javascript line.
 
----- Original Message -----
To: Struts
Sent: Thursday, May 31, 2001 8:46 PM
Subject: Using Javascript to cancel submit?

Hello All,
 
Currently I'm working on a form, but before submit, I have an onSubmit() in my form tag that verifies they want to submit.  The problem is that with my confirmation javascript popup, whether the user selects "OK" or "Cancel", the form is still submitted.  Is there a way to prevent the form from submitting if the user selects "Cancel"?
 
 
Thanks in advance!
 
Steven

Reply via email to