Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Need help with change color of td and link

Reply
Thread Tools

Need help with change color of td and link

 
 
Surajit
Guest
Posts: n/a
 
      02-25-2005
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\";homelin k.className=\"menutexton\";window.status=\"Home\"; return
true;' onmouseout='this.className=\"menutextoff\";homelin k.className=\"menutextoff\";window.status=\"\";ret urn
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
 
Reply With Quote
 
 
 
 
RobB
Guest
Posts: n/a
 
      02-25-2005
Surajit wrote:
> 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\";homelin k.className=\"menutexton\";window.status=\"Home\"; return
> true;'

onmouseout='this.className=\"menutextoff\";homelin k.className=\"menutextoff\";window.status=\"\";ret urn
> 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

 
Reply With Quote
 
 
 
 
surajitkhan@gmail.com
Guest
Posts: n/a
 
      02-26-2005
got the idea
Thanks


RobB wrote:
> Surajit wrote:
> > 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\";homelin k.className=\"menutexton\";window.status=\"Home\"; return
> > true;'

>

onmouseout='this.className=\"menutextoff\";homelin k.className=\"menutextoff\";window.status=\"\";ret urn
> > 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing font color from current font color to black color Kamaljeet Saini Ruby 0 02-13-2009 04:58 PM
change text color onclick, and change it back - will post to DB apparker Javascript 10 04-03-2007 01:57 PM
Link Doesn't Change Color spilparc Firefox 1 07-18-2005 08:34 AM
Change text color for one document.write but not color of all text? kroger@princeton.edu Javascript 7 02-02-2005 01:23 PM
Change text color of "visited link" back to unvisited color ??? Matt Adams HTML 0 08-26-2003 10:27 AM



Advertisments