File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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!
I agree. Here's the link:
subject: JS inside innerHtml
It's not a secret anymore!