Hi,
My jsp has a text field company and i have two logic tags with properties years and none.
HTML Code:
<html:text property="company" onChange="showHint()" />
<logic:equal value="year" property="years" name="announcementListForm">
<a title="year">By Year:</a>
<a title="2008" href="../announcementList.do?year=2008">2008 </a>
<a title="2007" href="../announcementList.do?year=2007">2007 </a>
<a title="2006" href="../announcementList.do?year=2006">2006</a>
</logic:equal>
[s][s][s] [/s][/s][/s]
<logic:equal value="none" property="years" name="announcementListForm">
</logic:equal>
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
function showHint()
{
if(document.forms[0].years.value==null || document.forms[0].years.value=="years" )
{
document.forms[0].years.value="none";
}
}
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