•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 327,694 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,706 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 844 | Replies: 5 | Solved
![]() |
I have one table which is generated using javascript dynamically.
In have write one function which creates table dynamically
for IE i have writed
mytable.onClick=some_function();
for onclick event it works fine.
But when i generate more than one table dynamically using the same function then onclick does not work. If anyone have solution please reply asap. Thanx for spending your precious time.
In have write one function which creates table dynamically
for IE i have writed
mytable.onClick=some_function();
for onclick event it works fine.
But when i generate more than one table dynamically using the same function then onclick does not work. If anyone have solution please reply asap. Thanx for spending your precious time.
Ideas are the building blocks of Ideas
Jason Zebehazy
Jason Zebehazy
•
•
Join Date: Mar 2008
Posts: 149
Reputation:
Rep Power: 1
Solved Threads: 19
Usually the simplest thing to do is to click on the yellow ! icon in the bottom left of the browser window in IE. This will tell you the error. Better still, use Firefox and use the error console.
We can't see your code, so thats the best I can do.
Matti Ressler
Suomedia
We can't see your code, so thats the best I can do.
Matti Ressler
Suomedia
If you want your dreams to come true, the first thing you must do is to wake up....
Suomedia - Dynamic Content Management
Suomedia - Dynamic Content Management
I have writed My code below for better understanding.This code works fine for one object but for more than one object it does not work or no error is occur.
javascript Syntax (Toggle Plain Text)
function getNodeTable(ip){ //alert("IE getNode Table"); var nodeTable=document.createElement("TABLE"); nodeTable.align='center'; var nodebody=document.createElement("TBODY"); var tableRow,tableCell; nodebody.id='body'+ip; nodeTable.appendChild(nodebody); nodeTable.border=0; nodeTable.id=ip; nodeTable.name=ip; tableRow=document.createElement("TR"); tableCell=document.createElement("TD"); tableCell.align='center'; tableCell.innerHTML='<img src=../images/waiting.gif height=62 width=88>'; tableRow.appendChild(tableCell); nodebody.appendChild(tableRow); tableRow=document.createElement("TR"); tableCell=document.createElement("TD"); tableCell.innerHTML='<div color=white align=center>Gathering Information <img src=../images/ajax-loader.gif></div>';//replace with actual message tableRow.appendChild(tableCell); nodebody.appendChild(tableRow); var ipbkup="'"+ip+"'"; nodeTable.setAttribute('onClick','sendToServe('+ipbkup+')');//generic method in ajaxcode.js nodeTable.onMouseOver="javascript:this.style.cursor='pointer'"; nodeTable.onLoad=sendRequestToServer(nodeTable,ip); var newCell=document.createElement("DIV"); newCell.appendChild(nodeTable); return newCell; }
Last edited by peter_budo : Apr 1st, 2008 at 7:13 am. Reason: Keep It Organized - please use [code] tags
Ideas are the building blocks of Ideas
Jason Zebehazy
Jason Zebehazy
I have found the bug. Thanx for your help. My function gives me table in a div and i forgot to remove div while appending it to the document. I have writed code for only one object and it was not there for multiple object so that was the problem. Thanx for spending your valuable time friends.
Ideas are the building blocks of Ideas
Jason Zebehazy
Jason Zebehazy
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
DaniWeb Marketplace (Sponsored Links)
- FF vs IE dhtml/javascript/forms issue (JavaScript / DHTML / AJAX)
- delphi object casting (Pascal and Delphi)
- Creating a popup menu on mouse over (JavaScript / DHTML / AJAX)
- URGENT! Loading Roles From ticket.UserData (ASP.NET)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Float value checking
- Next Thread: Image Swapping


Linear Mode