button
Hello all...
I have my code something like his:
<label for="btn></label>
<input type="button" id="btn" name="btn" value="Add" onclick="javascript:showButton('id');"/>
<div>
<div id="id" style="display: none;">
<input type="text" id="txt" name="txt" maxlength="5" />
</div>
so when the page first loads up, i have this text box hidden ...
but when the add button is clicked I have to show the text box...and I'm doing this using javascript...
and if the button is clicked I need to check for null or emtpy for the text box and throw an error if it is null or empty ...
but if the button is not clicked I can the skip the check for null in my action class...
My question is how can i know whether new is clicked or not since it is of type button...I can't use submit because i already have a submit button ...this add button is only to add a name in the text box...
Help is greatly appreciated...
Thanks,
Greeshma

