Hi - can anyone help with the code below please - when clicked, it
should add a table row to a table, with a checked checkbox (hidden) -
and if the user scrolls over the new row, it should hilight it - this
works.
However, the onmouseout does not remove the background color of the div
- it remains the same color as when the onmouseover set it.
Additionally, when the form is submitted, with the newly created row,
the checkbox is not recognised in request.form.
This script works perfectly in IE6, but I have problems in NN7 - can
anyone suggest where it may be going wrong?
Many thanks,
function addRowaddFact (cb_val) {
var table;
if (document.all)
table = document.all.tb laddFact;
else
table = document.getEle mentById('tblad dFact');
if (table && table.insertRow ) {
var row = table.insertRow (table.rows.len gth);
var cell = row.insertCell( 0);
cell.innerHTML = '<div title="Click to remove"
onMouseOver="th is.style.cursor =\'hand\';this. style.backgroun d=\'#bbefff\
'" onMouseOut="thi s.style.backgro und.color=\'tra nsparent\'"
onclick=mtremRo w(this) id="' + cb_val + '"\/> <input checked
type="checkbox" name="cbaddFact " style="display: ;" value="' + cb_val +
'"\/><span class="search_i nput"> &nb sp;<img
src="images/mt_bullet.gif" width="11"
height="10">&nb sp; '+cb_v al+'<\/span><\/div>';
}
}
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
should add a table row to a table, with a checked checkbox (hidden) -
and if the user scrolls over the new row, it should hilight it - this
works.
However, the onmouseout does not remove the background color of the div
- it remains the same color as when the onmouseover set it.
Additionally, when the form is submitted, with the newly created row,
the checkbox is not recognised in request.form.
This script works perfectly in IE6, but I have problems in NN7 - can
anyone suggest where it may be going wrong?
Many thanks,
function addRowaddFact (cb_val) {
var table;
if (document.all)
table = document.all.tb laddFact;
else
table = document.getEle mentById('tblad dFact');
if (table && table.insertRow ) {
var row = table.insertRow (table.rows.len gth);
var cell = row.insertCell( 0);
cell.innerHTML = '<div title="Click to remove"
onMouseOver="th is.style.cursor =\'hand\';this. style.backgroun d=\'#bbefff\
'" onMouseOut="thi s.style.backgro und.color=\'tra nsparent\'"
onclick=mtremRo w(this) id="' + cb_val + '"\/> <input checked
type="checkbox" name="cbaddFact " style="display: ;" value="' + cb_val +
'"\/><span class="search_i nput"> &nb sp;<img
src="images/mt_bullet.gif" width="11"
height="10">&nb sp; '+cb_v al+'<\/span><\/div>';
}
}
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Comment