dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Problem in executing the code with IE browser

Hybrid View

  1. #1
    Join Date
    Apr 2013
    Posts
    1

    Problem in executing the code with IE browser

    My need is to create a table dynamically and append it with corresponding values from the response XML. My problem is my code is working properly in FireFox browser, where in IE it shows an error - "document.getElementById(...).rows.1.cells' is null or not an object".

    My function code
    var tableEle = document.createElement('TABLE');
    var trow = document.createElement('TR');
    tableEle.appendChild(trow);
    var tcel = document.createElement('TD');
    var input = document.createElement('input');
    input.setAttribute("type", "text");
    tcel.appendChild(input);
    trow.appendChild(tcel);
    pContainer.appendChild(tableEle);

    document.getElementById(tableName).rows[1].cells[1].innerHTML = ~xml value~;

  2. #2
    Join Date
    Feb 2006
    Posts
    2,927
    excuse it- I neglected to see your assigning via innerHTML, which doesn't work for table cells in older IE's.
    Last edited by mrhoo; 04-13-2013 at 05:58 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles