473,756 Members | 2,117 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need help with change color of td and link

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='colpaleb lue'><tr>");

write("<td width='100%' height='30' align='left' valign='middle'
onclick='fn_red irect(\"../index.html\");'
onmouseover='th is.className=\" menutexton\";ho melink.classNam e=\"menutexton\ ";window.status =\"Home\";retur n
true;' onmouseout='thi s.className=\"m enutextoff\";ho melink.classNam e=\"menutextoff \";window.statu s=\"\";return
true;'><img src='../images/common/trans.gif' width='10' height='1'><a
href='../index.html' onmouseover='wi ndow.status=\"H ome\";return true;'
onmouseout='win dow.status=\"\" ;return true;' class='menutext '
id='homelink'>H ome</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
Jul 23 '05 #1
2 1732
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='colpaleb lue'><tr>");

write("<td width='100%' height='30' align='left' valign='middle'
onclick='fn_red irect(\"../index.html\");'
onmouseover='th is.className=\" menutexton\";ho melink.classNam e=\"menutexton\ ";window.status =\"Home\";retur n true;' onmouseout='thi s.className=\"m enutextoff\";ho melink.classNam e=\"menutextoff \";window.statu s=\"\";return true;'><img src='../images/common/trans.gif' width='10' height='1'><a
href='../index.html' onmouseover='wi ndow.status=\"H ome\";return true;' onmouseout='win dow.status=\"\" ;return true;' class='menutext '
id='homelink'>H ome</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

Jul 23 '05 #2
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='colpaleb lue'><tr>");

write("<td width='100%' height='30' align='left' valign='middle'
onclick='fn_red irect(\"../index.html\");'

onmouseover='th is.className=\" menutexton\";ho melink.classNam e=\"menutexton\ ";window.status =\"Home\";retur n
true;'

onmouseout='thi s.className=\"m enutextoff\";ho melink.classNam e=\"menutextoff \";window.statu s=\"\";return
true;'><img src='../images/common/trans.gif' width='10' height='1'><a href='../index.html' onmouseover='wi ndow.status=\"H ome\";return

true;'
onmouseout='win dow.status=\"\" ;return true;' class='menutext '
id='homelink'>H ome</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


Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2600
by: Sorby | last post by:
Hi I've been coding in PHP for a little while now and was starting to feel pretty confident but then realise I need to understand regular expressions to solve a particular problem I've got ... What a horrible can of worms regex is!! (to the uninitiated at least). I realise that if I spend the next few weeks researching regex I'll probably find the answer but I was wondering if anyone here would kindly help speed up the process?
8
2180
by: Drifter | last post by:
I have just picked up a little hobble to fix some code for an e-commerce site (older). It uses Aliant as the Secure Transaction server (if familiar with it you will just shiver). Problem is the secure server picks up the URL where you came from, in my case this is a product screen - a single product - not the list of products. Aliant's code reads this URL, and if you <continue shopping> you end up back on the single product page, as this is...
2
4439
by: techy techno | last post by:
hii Experts..!! I need someone to tell me where I can get a Currency Converter like http://cconv.textor.com please can someone tell me where I can get it I need it for free + I dont need any link of the co. the code for this is here but when I change it it just says unauthorize
5
35240
by: Matt | last post by:
I created 3 hyperlinks, when the user click each link, it will change the color of the text of a link. For example, when user clicks Link1, text Link1 will become red color, but Link2 and Link3 unchange. Here's my attempts, any ideas?? <script language="javascript"> function changecolor (i) { document.i.fontcolor = red; }
14
2365
by: J. Makela | last post by:
Hallo. This should be a pretty entertaining question for you *real* javascript writers.. I, being the lowly photoshop guy at an ad agency made the mistake of actually saying "HTML" in a conversation once.. and now I have been tasked with building a big website with LOTS of fancy javascripting. Image rollovers mostly. Only problem is that I don't really know how to do it. Of course, that's of no consequence so I have to do it anyway....
4
4002
by: paula | last post by:
I've got a problem with asp.net i am trying to make a menu control. and have searched the web for serveral controls but they don't work correctly. I am pretty new to asp.net building. What am i looking for. i am looking for code to make a dynamical menu with submenus The menu items are stored in a MS SQL Table and when by loading the page the items will be created. i have made a asp table. i want my menu on the left cell, in the middle...
1
1367
by: Steel | last post by:
Hi at all this is a little part of my CSS <style type="text/css"> body{background:#F8F0D8;} a:link{color:red;background:#F8F0D8;} a:hover{background:blue;color:yellow} </style>
20
4282
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site is structured as an upside-down tree, and (if I remember correctly) never more than 4 levels. The site basically grew (like the creeping black blob) ... all the pages were created in Notepad over the last
0
9963
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: Programs dealing with autoruns Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list programs that help me to view/modify the autoruns on my Windows PC? Ans: Other than Sysinternals Autoruns, there are only a few programs which are good enough to be used when dealing with autoruns. For more information about Sysinternals Autoruns, read Que-7 in Windows Autorun FAQs: Description....
0
1384
by: zeckdude | last post by:
Hi, I am having some issues with my site. I have a main Nav with four links that load in 4 different sections. You can see the page I am working on here: http://idea-palette.com/official/newofficialsite4.html What I am trying to do is, when a user clicks on another Main Nav button, such as 'Web Projects', the background-image changes to another image that shows the lightbulb being on. I also want it to change back the background-image...
0
9287
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9886
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9722
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8723
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6542
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5155
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3369
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2677
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.