serAph1m
07-10-2003, 03:24 PM
I have the following at the top of my page:
<script language="Javascript">
var TCOLOR = "#B0FF80";
var BCOLOR = "#FFFFFF";
function SWAP()
{
var TEMP = "";
TEMP = TCOLOR;
TCOLOR = BCOLOR;
BCOLOR = TEMP;
}
function write.T()
{
document.write(TCOLOR);
}
function write.B()
{
document.write(BCOLOR);
}
</script>
and here's where the action comes into play:
<logic:iterate id="aListDefinitionRow" name="campaignListDefinitions">
<%/* if (SWAP)
{
TCOLOR = "#B0FF80";
BCOLOR = "#FFFFFF";
}
else
{
BCOLOR = "#B0FF80";
TCOLOR = "#FFFFFF";
}*/%>
<tr class="tableinner">
<td align="left" bgcolor=write.B();><font face="Arial" color=write.T();><bean.write name="aListDefinitionRow" property="Id"/></font></td>
<td align="left" bgcolor=write.B();><font face="Arial" color=write.T();><bean.write name="aListDefinitionRow" property="Label"/></font></td>
<td align="left" bgcolor=write.B();><font face="Arial" color=write.T();><bean.write name="aListDefinitionRow" property="Owner"/></font></td>
<td align="left" bgcolor=write.B();><font face="Arial" color=write.T();><bean.write name="aListDefinitionRow" property="Status"/></font></td>
<td align="left" bgcolor=write.B();><font face="Arial" color=write.T();><bean.write name="aListDefinitionRow" property="Description"/></font></td>
<td align="left" bgcolor=write.B(); colspan="2"><font face="Arial" color=write.T()><html:link paramName="aListDefinitionRow" paramProperty="id" paramId="id" page="/listManagement.do?action=edit" >Edit</html:link></font>
<font face="Arial"> / <html:link paramName="aListDefinitionRow" paramProperty="id" paramId="id" page="/listManagement.do?action=delete" >Delete</html:link></font></td></tr><td></td>
<script>
SWAP();
</script>
</logic:iterate>
(for those of you that arent familiar with the "logic" and "bean" things, theu're JSP (struts) tags - the code loops between the iterate statements.)
Im assuming Im commiting an ill-experienced syntax error - could you guys help me out? thx!
~ Rory K
<script language="Javascript">
var TCOLOR = "#B0FF80";
var BCOLOR = "#FFFFFF";
function SWAP()
{
var TEMP = "";
TEMP = TCOLOR;
TCOLOR = BCOLOR;
BCOLOR = TEMP;
}
function write.T()
{
document.write(TCOLOR);
}
function write.B()
{
document.write(BCOLOR);
}
</script>
and here's where the action comes into play:
<logic:iterate id="aListDefinitionRow" name="campaignListDefinitions">
<%/* if (SWAP)
{
TCOLOR = "#B0FF80";
BCOLOR = "#FFFFFF";
}
else
{
BCOLOR = "#B0FF80";
TCOLOR = "#FFFFFF";
}*/%>
<tr class="tableinner">
<td align="left" bgcolor=write.B();><font face="Arial" color=write.T();><bean.write name="aListDefinitionRow" property="Id"/></font></td>
<td align="left" bgcolor=write.B();><font face="Arial" color=write.T();><bean.write name="aListDefinitionRow" property="Label"/></font></td>
<td align="left" bgcolor=write.B();><font face="Arial" color=write.T();><bean.write name="aListDefinitionRow" property="Owner"/></font></td>
<td align="left" bgcolor=write.B();><font face="Arial" color=write.T();><bean.write name="aListDefinitionRow" property="Status"/></font></td>
<td align="left" bgcolor=write.B();><font face="Arial" color=write.T();><bean.write name="aListDefinitionRow" property="Description"/></font></td>
<td align="left" bgcolor=write.B(); colspan="2"><font face="Arial" color=write.T()><html:link paramName="aListDefinitionRow" paramProperty="id" paramId="id" page="/listManagement.do?action=edit" >Edit</html:link></font>
<font face="Arial"> / <html:link paramName="aListDefinitionRow" paramProperty="id" paramId="id" page="/listManagement.do?action=delete" >Delete</html:link></font></td></tr><td></td>
<script>
SWAP();
</script>
</logic:iterate>
(for those of you that arent familiar with the "logic" and "bean" things, theu're JSP (struts) tags - the code loops between the iterate statements.)
Im assuming Im commiting an ill-experienced syntax error - could you guys help me out? thx!
~ Rory K