Need help with change color of td and link

S

Surajit

Hi

I have written the following code for changing color of the <td> and
also the text in that <td> on mouseover. I have written it as a
javascript code and need it that way only.


write("<table width='100%' cellspacing='0' cellpadding='0' border='0'
class='colpaleblue'><tr>");

write("<td width='100%' height='30' align='left' valign='middle'
onclick='fn_redirect(\"../index.html\");'
onmouseover='this.className=\"menutexton\";homelink.className=\"menutexton\";window.status=\"Home\";return
true;' onmouseout='this.className=\"menutextoff\";homelink.className=\"menutextoff\";window.status=\"\";return
true;'><img src='../images/common/trans.gif' width='10' height='1'><a
href='../index.html' onmouseover='window.status=\"Home\";return true;'
onmouseout='window.status=\"\";return true;' class='menutext'
id='homelink'>Home</a></td>");

write("</tr></table>");

This is working fine with IE6+ but in NS7+ it is giving error that
"homelink is not defined".

Please let me know where is the issue, if anyone has got any idea
about this.

Thanks
Surajit
 
R

RobB

Surajit said:
Hi

I have written the following code for changing color of the <td> and
also the text in that <td> on mouseover. I have written it as a
javascript code and need it that way only.


write("<table width='100%' cellspacing='0' cellpadding='0' border='0'
class='colpaleblue'><tr>");

write("<td width='100%' height='30' align='left' valign='middle'
onclick='fn_redirect(\"../index.html\");'
onmouseover='this.className=\"menutexton\";homelink.className=\"menutexton\";window.status=\"Home\";return
onmouseout='this.className=\"menutextoff\";homelink.className=\"menutextoff\";window.status=\"\";return
true;'><img src='../images/common/trans.gif' width='10' height='1'><a
href='../index.html' onmouseover='window.status=\"Home\";return true;'
onmouseout='window.status=\"\";return true;' class='menutext'
id='homelink'>Home</a></td>");

write("</tr></table>");

This is working fine with IE6+ but in NS7+ it is giving error that
"homelink is not defined".

Please let me know where is the issue, if anyone has got any idea
about this.

Thanks
Surajit

http://www.jibbering.com/faq/#FAQ4_41
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top