problem with java script
843838Feb 13 2006 — edited Feb 13 2006hii,
i have taken textboxes in for loop.i want to do that if the values in the textboxes are 0,and if the user clicks the textbox then that textbox value
should disappear.if the value is not 0 then it should not disappear.
i got it,but i also want that if the user clicks on another textbox and the above one does not given any value then it should take automatically as 0.i am not getting it.
if any body knows,tell me.
i am sending the code.
i have taken for loop in jsp like
<%
for(int i=0;i<10;i++)
{
%>
<input type="text" name="box" value='0' size="6" onClick="fnTest('<%=i%>')"><br>
<%
}
%>
the function is
function fnTest(str)
{
//alert("Str value"+str);
if(formHeader.box[str].value=='0')
{
formHeader.box[str].value=' ';
}
}
thanx