[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to change the color of text elsewhere on page on rollover

Posted on 2008-06-11
1
Medium Priority
?
232 Views
Last Modified: 2013-12-25
I am trying to do something on an .asp based page.  I have a line of text that, when I roll over it, I would like to have change the color of a word elsewhere on my page.  Is this hard to do?  Can someone show me how this is done?

Ideally I would like to do something like this ... http://www.siegelgale.com/expertise/ ... but I can settle for just changing the color if that is a bit too tricky.

Thanks!
0
Comment
Question by:TheShaner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 8

Accepted Solution

by:
CoyotesIT earned 2000 total points
ID: 21761870
You can try something like this here. You will need to be able to reference the id of the text, which i've assigned to the <span> tag of the text that changes color.

Hope this helps.



<html>
<head>
 
<script type="text/javascript">
	function changeColor(id, color) {
		document.getElementById(id).style.color = color;
	}
</script>
 
</head>
 
<body>
<p>
<span onmouseover="changeColor('changemycolor', 'red');" onmouseout="changeColor('changemycolor', 'black');">Roll over Me!</span>
</p>
 
<p>
Some filler text, Some filler text, Some filler text, Some filler text, Some filler text, Some filler text, 
</p>
 
<p>
<span id="changemycolor">Roll over that text up there to see me change color</span>
</p>
 
</body>
 
</html>

Open in new window

0

Featured Post

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question