logo

help me ....

Posted by pardeep ravesh in C# .NET

Friday, November 20, 2009 5:24:32 AM

 var cell0 = row.insertCell(0);
            var element0 = document.createElement("label");
            element0.innerHTML = newRow;
            element0.setAttribute("size", "3");
            
            element0.setAttribute("name", "lblRownumber" + newRow.toString());
            element0.setAttribute("id", "lblRownumber" + newRow.toString());
            cell0.appendChild(element0)



not working in both browers only working in one browser

Biography
pardeep has not submitted biographical details.

Site Rank:  Not applicable - Current Winnings:  $0.00

Reply Reply Using Power Editor
Prakash C

use textContent instead innerHtml for FF browser

Prakash C replied to pardeep ravesh

EggHeadCafe's human moderators scored this post for our messageboard contest.

Friday, November 20, 2009 7:25:36 AM

Find which browser then use innerHtml & textContent based on it.

Ex:
var browserName=navigator.appName; 
if (browserName=="firefox")
{
//use textContent
}
else if (browserName=="Microsoft Internet Explorer")
{
//use innerHtml
}

Hope this helps u... :-)

Biography
Am a .NET Developer

Site Rank:  Not applicable - Current Winnings:  $0.00

Reply Reply Using Power Editor

Didn't Find The Answer You Were Looking For?

EggHeadCafe has experts online right now that may know the answer to your question.  We pay them a bonus for answering as many questions as they can.  So, why not help them and yourself by becoming a member (free) and ask them your question right now?
Ask Question In Live Forum








  $1000    Adam Houldsworth - $173  |  Jonathan VH - $154  |  Kirtan Patel - $116  |  Mr. Khan - $99  |  F Cali - $94  |  more Neado  |  Free Icons  |  Privacy  |   (c) 2010