Hi,
My jsp has a text field company and i have two logic tags with properties years and none.
[HTML]
<html:text property="compa ny" onChange="showH int()" />
<logic:equal value="year" property="years " name="announcem entListForm">
<a title="year">By Year:</a>
<a title="2008" href="../announcementLis t.do?year=2008" >2008 </a>
<a title="2007" href="../announcementLis t.do?year=2007" >2007 </a>
<a title="2006" href="../announcementLis t.do?year=2006" >2006</a>
</logic:equal>
<logic:equal value="none" property="years " name="announcem entListForm">
</logic:equal>[/HTML]
i need to write a javascript such that when i change the value of my company in the text box i need to set the logic tag property to none ,only onChange().
i tried like
when i tried this way i am getting
document.forms[0].years.value is null or not an object.
how to go ahead with this...
Thanks
Raj
My jsp has a text field company and i have two logic tags with properties years and none.
[HTML]
<html:text property="compa ny" onChange="showH int()" />
<logic:equal value="year" property="years " name="announcem entListForm">
<a title="year">By Year:</a>
<a title="2008" href="../announcementLis t.do?year=2008" >2008 </a>
<a title="2007" href="../announcementLis t.do?year=2007" >2007 </a>
<a title="2006" href="../announcementLis t.do?year=2006" >2006</a>
</logic:equal>
<logic:equal value="none" property="years " name="announcem entListForm">
</logic:equal>[/HTML]
i need to write a javascript such that when i change the value of my company in the text box i need to set the logic tag property to none ,only onChange().
i tried like
Code:
function showHint()
{
if(document.forms[0].years.value==null || document.forms[0].years.value=="years" )
{
document.forms[0].years.value="none";
}
}
document.forms[0].years.value is null or not an object.
how to go ahead with this...
Thanks
Raj
Comment