User Name Password Register
DaniWeb IT Discussion Community
All
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 330,373 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 2,887 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

Onclick does not work in ie for multiple object

Join Date: Mar 2006
Location: India
Posts: 47
Reputation: shaikh_mshariq is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 1
shaikh_mshariq's Avatar
shaikh_mshariq shaikh_mshariq is offline Offline
Light Poster

Re: Onclick does not work in ie for multiple object

  #5  
Mar 30th, 2008
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.


  1. function getNodeTable(ip){
  2. //alert("IE getNode Table");
  3. var nodeTable=document.createElement("TABLE");
  4. nodeTable.align='center';
  5. var nodebody=document.createElement("TBODY");
  6. var tableRow,tableCell;
  7. nodebody.id='body'+ip;
  8. nodeTable.appendChild(nodebody);
  9. nodeTable.border=0;
  10. nodeTable.id=ip;
  11. nodeTable.name=ip;
  12. tableRow=document.createElement("TR");
  13. tableCell=document.createElement("TD");
  14. tableCell.align='center';
  15. tableCell.innerHTML='<img src=../images/waiting.gif height=62 width=88>';
  16. tableRow.appendChild(tableCell);
  17. nodebody.appendChild(tableRow);
  18. tableRow=document.createElement("TR");
  19. tableCell=document.createElement("TD");
  20. tableCell.innerHTML='<div color=white align=center>Gathering Information <img src=../images/ajax-loader.gif></div>';//replace with actual message
  21. tableRow.appendChild(tableCell);
  22. nodebody.appendChild(tableRow);
  23. var ipbkup="'"+ip+"'";
  24. nodeTable.setAttribute('onClick','sendToServe('+ipbkup+')');//generic method in ajaxcode.js
  25. nodeTable.onMouseOver="javascript:this.style.cursor='pointer'";
  26. nodeTable.onLoad=sendRequestToServer(nodeTable,ip);
  27. var newCell=document.createElement("DIV");
  28. newCell.appendChild(nodeTable);
  29. return newCell;
  30. }
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
Reply With Quote  
All times are GMT -4. The time now is 10:36 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC