I'm sorry, I should have written down a complete section of code.
Here goes. ManageKQADocume ntForm is a Form I have set up for the
current jsp page (ManageKQADocum entForm.java). The Form logic work. I
can transfer data around without problems to and from the Form and a
Transfer Object is used to communicate with a Database (DAO object).
My problem is not with the underlying strut logic. It's with the call
to a javascript function inside a <logic:equal(th e functions are in
the <headtags). If I call an "alert('hel lo world');" inside the
<logic:equal> , it works, If I call my own function, it doesnt.
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"% >
<bean:define id="manageKQADo cumentTO" name="ManageKQA DocumentTO"></
bean:define>
<jsp:include page="/jsp/common/header.jsp" flush="true" />
<jsp:include page="/jsp/common/menu.jsp" flush="true" />
<jsp:include page="/jsp/common/errorpage.jsp" flush="true" />
<html>
<head>
<link REL="stylesheet " HREF="css/bear.css" TYPE="text/css">
<script type="text/javascript">
function disableCif()
{
document.Manage KQADocumentForm .cifType1.disab led="true";
document.Manage KQADocumentForm .cifType2.disab led="true";
document.Manage KQADocumentForm .cifType3.disab led="true";
}
function enableCifType1( )
{
document.Manage KQADocumentForm .cifType1.disab led="false";
}
function enableCifType2( )
{
document.Manage KQADocumentForm .cifType2.disab led="false";
}
function enableCifType3( )
{
document.Manage KQADocumentForm .cifType3.disab led="false";
}
</script>
</head>
<body class="MainBody " onload="javascr ipt:disableCif( );">
<logic:iterat e id="cifType" property="check ItemFormTypes"
name="manageKQA DocumentTO">
<logic:equal value="1" name="cifType">
<scriptalert('h ello'); </script>
</logic:equal>
<logic:equal value="2" name="cifType">
<scriptenableCi fType2(); </script>
</logic:equal>
<logic:equal value="3" name="cifType">
<scriptenableCi fType3(); </script>
</logic:equal>
</logic:iterate>
<form name="ManageKQA DocumentForm">
<table border="0" width="100%" class="TableBod y" cellspacing="0"
cellpadding="0" >
<tr>
<td WIDTH="100%" CLASS="PageHead ing">KQA Edit Management</td>
</tr>
</table>
<br>
<table border="0" width="100%" class="TableBod y" cellspacing="0"
cellpadding="0" >
<tr>
<td>
<input type="text" name="sbnumber" size="20"/
> &n bsp; Enter a Service Bulletin
number. &n bsp;   ;<input type="button"
name="sbnumbers ubmit" value="Submit"
onclick="javasc ript:sbnumberCh eck()"/>
</td>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0" >
<tr>
<td valign="middle" align="left">
<input type="radio" name="cifType1" setGroup="group 1"
value="1"/> &n bsp;
<% int count = 0; %>
<logic:iterat e id="cifTypeLook up"
property="check ItemFormTypesLo okup" name="manageKQA DocumentTO">
<% if(count==0){ %>
<bean:write name="cifTypeLo okup"/>
<% } count++; %>
</logic:iterate>
</td>
</tr>
<tr>
<td valign="middle" align="left">
<input type="radio" name="cifType2" setGroup="group 1"
value="2"/> &n bsp;
<% count = 0; %>
<logic:iterat e id="cifTypeLook up"
property="check ItemFormTypesLo okup" name="manageKQA DocumentTO">
<% if(count==1){ %>
<bean:write name="cifTypeLo okup"/>
<% } count++; %>
</logic:iterate>
</td>
</tr>
<tr>
<td valign="middle" align="left">
<input type="radio" name="cifType3" setGroup="group 1"
value="3"/> &n bsp;
<% count = 0; %>
<logic:iterat e id="cifTypeLook up"
property="check ItemFormTypesLo okup" name="manageKQA DocumentTO">
<% if(count==2){ %>
<bean:write name="cifTypeLo okup"/>
<% } count++; %>
</logic:iterate>
</td>
</tr>
</table>
</form>
</body>
<script language="javas cript">
function sbnumberCheck()
{
if(document.Man ageKQADocumentF orm.sbnumber.va lue=="")
{
alert('Please enter valid Service Bulletin number.');
}
else
{
document.Manage KQADocumentForm .action="Update KQAViewPage.do" ;
document.body.s tyle.cursor = "wait";
document.Manage KQADocumentForm .submit();
}
}
</script>
</html>
Regards
Jean-Francois Michaud