Meaningless Drivel is fun!*
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
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
 
Similar Threads
by using javascript rows are hiding in mozilla but it is working IE
Browser not supporting Autocomplete
how to delete multiple browse
Using CSS to default print style to landscape
Problem in onclick radio and dynamically populated table