Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Struts1.1 <html:javascript>

843834Jul 30 2003 — edited Sep 4 2003
Hi,

A simple <html:javascript formName="abcdeForm"> should work fine if done all the things properly..like having a correct tld,all elments in the struts-config..etc.
well but no therez something somewhere going wrong :(
this is my jsp file..trying to validate whether out of the 4 radio buttons atleast 1 is selected bfore submitting the form.using validation.xml and validator.rules.xml file.

<%@ page language="java" %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>

<html:html>
<html:form action="/InputSubmit" method="post" onsubmit="return validateRadioForm(this);" >
<html:javascript formName="radioForm" />*//****************this tag creates a problem**/
<html:radio property="selectRadio" value="rad1" />
<html:radio property="selectRadio" value="rad2"/>
<html:radio property="selectRadio" value="rad3"/>
<html:radio property="selectRadio" value="rad4"/>
<html:submit />
</html:form>
</html:html>

THE PROBLEM IS THE <html:javascript> produces the javascript as text in the IE when the jsp page is requested.IF I PUT THE TAG IN <script> </script> then the tag works fine..but anyway the validations is not working....( a pop up alert which says plez select atleast one radio button)

Thanx in advance :)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 2 2003
Added on Jul 30 2003
4 comments
343 views