This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes how to display rows by using javascript in Opera  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to display rows by using javascript in Opera  " Watch "how to display rows by using javascript in Opera  " New topic
Author

how to display rows by using javascript in Opera

manohar penumarthi
Greenhorn

Joined: Sep 25, 2008
Posts: 2
var browser=navigator.appName;
if(browser=="Opera")
{

function generateRownew(componentcode,class) {

var table = document.getElementByClassName(class);
if(componentcode.length > 1) {

var row = table.insertRow(table.rows.length);

if(table.rows.length%2 == 0)
row.className = "odd";
else
row.className = "even";

for(var i = 0; i < componentcode.length; i++) {

var cell = row.insertCell(i);
cell.valign = "middle" ;
cell.innerHTML = componentcode[i];


}
}

}
}

check it and please send solution for this . and i don't know abt getElementByClassName
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Well I do not know of the getElementByClassName, I do know about getElementsByClassName.

Eric
 
Consider Paul's rocket mass heater.
 
subject: how to display rows by using javascript in Opera