Monday, September 19, 2011

How do I use HTML to change text on mouseover?

I have a link on my myspace that says communicate, and when you click it it takes you to the messaging page.



I would like for the 'communicate' link to change it's text to 'message' on mouseover. I would like to do this without using images, but I've been looking for a couple days and that's the only way that I can find to do it.



thankyouHow do I use HTML to change text on mouseover?Since it is MySpace, you can not use JavaScript methods. To change the actual link text on mouseover could be done with CSS or image and CSS, but other limitations may apply depending on whether you can edit the link code and its CSS directly or not.

A simple way, which you may not like is this:



%26lt;a href=%26quot;original link code here%26quot; title=%26quot;Message%26quot;%26quot;%26gt;Communicate%26lt;/a%26gt;





RonHow do I use HTML to change text on mouseover?Change on clickto onmouseover() in the text below:



%26lt;html%26gt;

%26lt;head%26gt;

%26lt;title%26gt;Writing to Same Doc%26lt;/title%26gt;

%26lt;script type=%26quot;text/javascript%26quot;%26gt;

function reWrite() {





var newContent = %26quot;%26lt;html%26gt;%26lt;head%26gt;%26lt;title%26gt;title%26lt;/title%26gt;%26lt;/head%26gt;?

newContent += %26quot;%26lt;body bgcolor='aqua'%26gt;%26lt;h1%26gt;This document is brand new.%26lt;/h1%26gt;%26quot;;

newContent += %26quot;Click the Back button to see original document.%26quot;;

newContent += %26quot;%26lt;/body%26gt;%26lt;/html%26gt;%26quot;;



document.write(newContent);

document.close();





}

%26lt;/script%26gt;

%26lt;/head%26gt;

%26lt;body%26gt;

%26lt;form%26gt;

%26lt;input type=%26quot;button%26quot; value=%26quot;Replace Content%26quot; onclick=%26quot;reWrite()%26quot;%26gt;

%26lt;/form%26gt;

%26lt;/body%26gt;

%26lt;/html%26gt;How do I use HTML to change text on mouseover?Wesley,



There is a way, but because you're wanting to do it with HTML, I'm assuming you're not a programmer.



If you know javascript, you could write a program to change the text. It's a bit complicated for someone not into programming. Perhaps you know someone.



If it is part of the myspace code, you might not have access to the code for that part of the page.