Click to See Complete Forum and Search --> : Variables Again (Only A Quicky THnx)


lukezweb
11-22-2003, 04:19 PM
I have link such as this:
<TR><TD onMouseOver="this.style.backgroundColor = '272727'; style.cursor='hand'" onMouseOut="this.style.backgroundColor ='';"><DIV ALIGN="CENTER"><A onclick="document.getElementById('Affiliates').innerHTML='"+general+"';">Computing</A></DIV></TD>

Which are meant set the value of the following div:


<TD colspan="6" onMouseOver="this.style.backgroundColor = '272727'; style.cursor='hand'" onMouseOut="this.style.backgroundColor ='';"><DIV ALIGN="CENTER"><marquee direction="left" scrolldelay="1" scrollamount="10"><DIV ID="Affiliates">Choose a category...</DIV></marquee></DIV></TD>

But they wont work it says Undetermined String Constant and then next to the word General place ';">General

Please help thanks

Mr J
11-23-2003, 05:55 AM
Please try the following

<script>
general="Hello World"
</script>
<table>
<TR>
<TD onMouseOver="this.style.backgroundColor = '272727'; style.cursor='hand' " onMouseOut="this.style.backgroundColor ='' "><DIV ALIGN="CENTER">
<A onclick="document.getElementById('Affiliates').innerHTML= general ">Computing</A></DIV></TD>

<TD onMouseOver="this.style.backgroundColor = '272727'; style.cursor='hand'" onMouseOut="this.style.backgroundColor ='' ">
<DIV ALIGN="CENTER" style="width:300px"><marquee direction="left" scrolldelay="1" scrollamount="10">
<DIV ID="Affiliates">Choose a category...</DIV></marquee></DIV></TD>
</tr></table>