This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes JS inside innerHtml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "JS inside innerHtml" Watch "JS inside innerHtml" New topic

JS inside innerHtml

Arya Devan

Joined: Feb 07, 2006
Posts: 28
hi ..

how can i call a javascript function inside innerHtml.

My situation goes like this. I have a table that has 4 columns. When i hit enter on the 3rd column a new row has to be created dynamically. I use innerHtml for the same. Now, i need to know how can i call another javascript function in that newly created row/column .. like ondblclick() or any other function on that 3rd column.

Tina Desai
Ranch Hand

Joined: Mar 13, 2003
Posts: 365
You must be knowing the function name when you are generating the row.
In the code to generate the row, you can specify the function name
Something like the following:


Alongwith being a good coder, try to be a good professional as well!
subject: JS inside innerHtml
Similar Threads
Sending multiple requests through AJAX
Finding element at a particular row in a column.
Calling JSP method from within a javascript function?
calling a servlet from javascript function??
Struts 2 and auto population of HTML tables