I am trying to parse a var to another frame using onclick. I am useless at JS and need some help understanding what to do. this is currently how my tr onclik works.
and in the body
the above code changes the colour of the table row on mouseover and opens a page in another frame onclick. When I click a row I want to send a var to another frame.
I have tried parent.frame3.value, but it does not seem to work.
I think I need more of an example.
Can you help based on my code above?
Code:
<script type="text/javascript" language="javascript">
var allcells = document.getElementsByTagName('tr');
function tr_mouseover(tr) {
if (!tr.jlatched) tr.className = 'jover';
}
function tr_mouseouturgent(tr) {
if (!tr.jlatched) tr.className = 'jurgent';
else tr.className = 'jlatched';
}
function tr_clickoverdue(tr) {
var c = 0;
while (cell = allcells.item(c++))
if (cell != tr) {
cell.className = cell.id; cell.jlatched = false;
}
else {
tr.className = 'jlatched'; tr.jlatched = true;
}
}
</script>
and in the body
Code:
<table>
<tr class='joverdue' id='joverdue' onmouseover='tr_mouseover(this)' onmouseout='tr_mouseoutoverdue(this)'
onclick='tr_clickoverdue(this)(top.itemdetail.location="jobdetails.php?job_id=1071")'>
<td class='jobstable' width='50'>1071</td><td class='jobstable' width='130'>Gate Ltd</td>
<td class='jobstable' title='GGHS - DelCastillo - Unable to dial Swiss'>GGHS - DelCastillo,...</td>
<td class='jobstable' width='65'>03-11-2004</td>
</tr>
</table>
the above code changes the colour of the table row on mouseover and opens a page in another frame onclick. When I click a row I want to send a var to another frame.
I have tried parent.frame3.value, but it does not seem to work.
I think I need more of an example.
Can you help based on my code above?