i was hoping you could help me out on a few questions. i appreciate the help.
1. i'm trying to remove a style class from an object like this
Code: Select all
whichrow.removeClassName('selrow');2. i'm trying to delete a row in a table using a row reference passeed into a function but rather than delete the row who's onclick event called the function, it deletes the first row at the top of the table. i don't know why this is because the rest of my move row control structures use the same refereence and they act fine:
Code: Select all
//x indicates the row which called the function
function moveRow(x){
if (whichrow) {
..
else if (x=='down'&&whichrow.nextSibling)
whichrow.parentNode.insertBefore(whichrow.nextSibling,
whichrow);
else if (x=='remove')
whichrow.parentNode.deleteRow(whichrow);
...3. finally is this syntax ok, because it will only pass variables if they're in numeric form, string values throw back errors:
Code: Select all
document.getElementById("pp-div2").innerHTML ="<a href='#' onClick='addPubFn(" + pubID + "," + pubName + "," + pubPostcode + "); return false;'>Add to Pub Crawl</a>";
changeBodyClass("pp-div2-hide","pp-div2-show");thanks for reading
garry