Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 392
  • Last Modified:

IE doesn't do object.innerHTML on t td element?

I have a web page which contains a table that is generated dynamically by AxpDB, (a free ASP control from http://www.axezz.com/AxpDb/Index.aspx), using ASP and ADO to extract the table information from an SQL Server database. It generates a really nice table and allows adding/deleting/editing/sorting, but I have no control over the HTML code that comprises the table. However, AxpDB gives each element an ID, which helps a lot.

One of the columns in the database is a URL. Of course, SQL Server doesn't have a hyperlink data type, so what I get in the table is just the text version of the hyperlink. I want to convert that text into a clickable link. So I wrote some Javascript that changes the table cells by changing objCell.innerHTML.replace() using s regular expression I picked up on the net, and running when the document loads. It works fine in Firefox, where I was debugging it ... but it doesn't work at all in Internet Explorer 7. And IE7 is our corporate standard; it's OK if it doesn't work in Firefox but it must work in IE7. Arrggh!

I've attached the page as it's seen in View | Source from IE. It a .txt file but it should be a .asp file.

What can I do to get this working in IE7?
1 Solution
Albert Van HalenAnalyst developerCommented:
You are checking the cell by getting the textContent property.
This isn't supported in IE. Use innerText property for IE
JonFlemingAuthor Commented:
Well, that was certainly easier than I thought!

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now