Jagadeesh M
asked on
Reset a struts form with out the page being refreshed
Hi -
I need to clear my struts form without refreshing the screen. But for some reason when i use the reset button on my form....it refreshes the screen.
I've couple of text boxes and couple of multiple selectable lists in my form. All I need is a reset button that should reset the form with out the page being refreshed.
Sample code is appreciated.
Thank You
I need to clear my struts form without refreshing the screen. But for some reason when i use the reset button on my form....it refreshes the screen.
I've couple of text boxes and couple of multiple selectable lists in my form. All I need is a reset button that should reset the form with out the page being refreshed.
Sample code is appreciated.
Thank You
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<script type="text/javascript">
<!--
function resetSelect(objID) {
selObject=document.getElem entById(ob jID)
//cycle through the options collection, setting the selected attribute of each to false
for (i=0;i < selObject.options.length;i ++) {
selObject.options[i].selec ted=false;
}
}
//-->
</script>
<!--
function resetSelect(objID) {
selObject=document.getElem
//cycle through the options collection, setting the selected attribute of each to false
for (i=0;i < selObject.options.length;i
selObject.options[i].selec
}
}
//-->
</script>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
:-)
ASKER