Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
handling onclick event by creating buttons dynamically
Joined: Dec 28, 2011
Jan 06, 2012 05:32:15
I am not getting why this code is not working . :( can Any one suggest how to handle this onclick event. I am generating the button dynamically. when I click on the button I need some funtionality to be done.here I want to display 1 alert message.
Thanks in advance.
[Edit - added code tags - MB]
Joined: Apr 06, 2010
Jan 06, 2012 05:56:40
Joined: Aug 30, 2010
Jan 06, 2012 12:04:49
Why are you using
scriptlet in your
? One of the first things you're going to hear in this forum is to replace your scriptlet code with JSTL.
<td><input type="button" name="getTotal1" id="getTotal1" onclick="func(event)" /></td>
Where is "event" being assigned here?
In preparing for battle I have always found that plans are useless, but planning is indispensable.
-- Dwight D. Eisenhower
Author and ninkuma
Joined: Jan 10, 2002
Jan 06, 2012 12:15:55
Indeed. Java scriptlets have been discredited since 2002 when JSP 2 was introduced. Using scriptlets in moderne JSP pages is nothing short of irresponsible.
Asking smart questions
Books by Bear
I agree. Here's the link:
subject: handling onclick event by creating buttons dynamically
spaces while populating using s:iterator
Get Rows from a Table
Getting duplicate values on the onChange event of dropdown list
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015