PDA

Click to See Complete Forum and Search --> : Help with Netscape / Ie Support for dynamic tables


scullee
Feb 17th, 2001, 09:22 PM
I want to have a table that support the adding of rows without having call the server to get the new page. I have got this working under IE but the same code doesnt work under netscape (no add row support)

The way i have this working is

var oRow, oCell;
var i, j;

// Insert row from the first body.
intRowCount++;

oRow = oTBody1.insertRow();
oCell = oRow.insertCell();
oCell.innerHTML = "<select style='Font-Size:8pt' name=selDate" + intRowCount + "></select>";
oCell = oRow.insertCell();
oCell.innerHTML = "<SELECT style='Font-Size:8pt' name=selSchool" + intRowCount + ">";
oCell = oRow.insertCell();
oCell.innerHTML = "<input type=hidden name=txtworkdesc" + intRowCount + "><a href=# onclick='OpenDesc(" + intRowCount + ")'><CENTER><IMG border=0 SRC='../images/text.gif'></a>";
oCell = oRow.insertCell();
oCell.innerHTML = "<SELECT style='Font-Size:8pt' name=selHourStartTime" + intRowCount + "></Select><SELECT style='Font-Size:8pt' name=selMinStartTime" + intRowCount + "></Select>";
oCell = oRow.insertCell();
oCell.innerHTML = "<SELECT style='Font-Size:8pt' name=selBreakTime" + intRowCount + "></Select>";
oCell = oRow.insertCell();
oCell.innerHTML = "<SELECT style='Font-Size:8pt' name=selHourEndTime" + intRowCount + "></Select><SELECT style='Font-Size:8pt' name=selMinEndTime" + intRowCount + "></Select>";

UpdateDropDowns(intRowCount);
document.frmMain.intNumrows.value = intRowCount;
}

Is there a way to get the same thing going under netscape 4+ ??

Thanks in advance

sail3005
Feb 18th, 2001, 10:32 AM
that code doesn't help very much. What errors are you getting when you run it in netscape?

Could you post some more of the code?

Psyrus
Feb 18th, 2001, 05:06 PM
Netscape doesn't support innerHTML. I'm not sure if you can accomplish this in Netscape.

scullee
Feb 18th, 2001, 05:43 PM
Here are some more details on what i am trying to achieve.

I have a table with coed on the bottom of it as follows
<tbody id=oTBody1 class=TBody></tbody>
This marks the table id oTbody

Then there is a button which calls the above java script. Under IE 5.5 it all works fine, the code adds another row to the table, then adds the cells with the code for the inner html incrementing the field values by 1 so i can reference the data when the submit is done.

Under netscape 6.0 it doesnt give an error message but under netscape 4.04 it returns oTBody1

Anyone have any idea how i can get something like this going with netscape ???

Thanks in advance

Dave