namita sasa wrote:I read that onClick works only when mouse is clicked.
That's kind of the definition of "onClick", no?
namita sasa wrote:I am gonna get pre-selected radio buttons and accordingly it will execute onClick event for that pre-selected radio button when page gets loaded.
That's something different:
you should use a JavaScript library to find all the selected radio buttons (probably of a specific name or class) and call a JavaScript method when the DOM is ready. That's a one-liner in most JavaScript libraries.
I'm moving this post to HTML/JavaScript as it has nothing to do with
Struts.