[Wylug-help] Javascript, frames and spans
Gary Stainburn
gary.stainburn at ringways.co.uk
Mon Jan 22 15:39:12 GMT 2007
Hi folks.
Using spans and javascript I can change the content of my web page as shown
below. I set up a status table:
<table border=0 cellpadding=0 cellspacing=0>
<tr><td ><span id="S10"><font color=red>64340</font></span></td></tr>
<tr><td ><span id="S20">64367</span></td></tr>
<tr><td ><span id="S30"><font color=red>65364</font></span></td></tr>
<tr><td ><span id="S40"><font color=red>65639</font></span></td></tr>
<tr><td ><span id="S50">New</span></td></tr>
<tr><td ><span id="S60"><font color=red>Used</font></span></td></tr>
<tr><td ><span id="S70"><font color=red>WALON</font></span></td></tr>
<tr><td ><span id="S80"><font color=red>Donc Com</font></span></td></tr>
<tr><td ><span id="S90"><font color=red>Donc Flt</font></span></td></tr>
<tr><td ><span id="S100"><font color=red>Leeds Com</font></span></td></tr>
<tr><td ><span id="S110"><font color=red>Leeds Flt</font></span></td></tr>
<tr><td ><span id="S120"><font color=red>Mazda Flt</font></span></td></tr>
<tr><td ><span id="S130"><font color=red>R.H.L.</font></span></td></tr>
</table></td><td valign=top></td></tr></table>
Then do some work using PHP, and then afterwards, generate the html:
<script language="JavaScript1.2">S130.innerHTML="<font
color=green>R.H.L.</font>"</script>
Which turns the text for R.H.L. from red to green. I now want to do this for
a web page that uses frames. My frameset is defined as
<frameset rows="80px, 24px, *, 35px" frameborder=0 border=0 framespacing=0>
<frame noresize name="head" src="debtors_head.html">
<frame noresize name="tabletop" valign=bottom src="debtors_tabletop.html">
<frame name="wbody" src="debtors_body.html">
<frame noresize name="footer" src="debtors_footer.html">
</frameset>
in debtors_head I have:
<table border=0><tr><form name=params method=post><th>Stage</th>
<th>Limit £</th>
<td><input name=dt_limit value='5000' maxlength=8 size=8></td>
<td><input type=submit name=Change value='Change'></td></form>
<td width=150px> </td>
<th>Total:</th>
<td><span id="Stotal">£0.00</span></td>
</tr></table>
in debtors_body I have tried variations of:
<script language="JavaScript1.2">top.head.Stotal.innerHTML="£123.45"</script>
top.head.Stotal
parent.head.Stotal
head.Stotal
parent.Stotal
Anyone know what I should be using to update the value
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
More information about the Wylug-help
mailing list