How to access dynamicly created objects in javascript?

madenough

New Member
I have created a dynamic table and I want to access one of the created objects in a javascript. For example: How do I adress a dynamicly created button?\[code\]<script type="text/javascript">function myJavaScriptFunction(){ //How do I know here which button triggered the function?}</script><table><% for (var i=0; i<10; i++) { %> <tr class="rowcell"> <td class="datacell"> <input type="button" id='<%="button-no-"+i%>' value="http://stackoverflow.com/questions/12777418/myButton" onclick="myJavaScriptFunction()"/> </td> </tr><% } %></table>\[/code\]Thank you in advance/John
 
Back
Top