Another mouse-over question - Post ID...

User 1892988 Photo


Registered User
151 posts

First:
Please bear with me. I'm a very non-technical person and completely helpless regarding scripting.

However, I'm still try to make a site with the limited scripting knowledge I have.

To the point:
I did look up a script which gives me the "mouse-over" effect. The only problem with it is that the buttons are created and working as promised, but I can't move them around on the "Visual Editor" tab and place them exactly where I want them (like on top of an image or something.

Please help me out,

Hereunder a copy of the script I have till now:

START QIOTE:

<SCRIPT LANGUAGE = "JavaScript">
<!--
if (document.images) {
img1on = new Image(); // The onmouseover image
img1on.src = "eyesbut1.gif";

img1off = new Image(); // The normally seen image
img1off.src = "eyesbut.gif";

} //This function changes the image when over.
function imgOn(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "on.src");
}
} //This function changes the image back when off.
function imgOff(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "off.src");
}
}
// -->
</SCRIPT>

Here's the part you need to add to your page in order to see it. Don't forget to change the #null reference to your link URL (ie http://www.wherever.com).

<A HREF="#null" onMouseOver="imgOn('img1')" onMouseOut="imgOff('img1')">
<IMG name="img1" BORDER=0 HEIGHT=30 WIDTH=100 SRC="eyesbut.gif" ></A>

END QUOTE.
HTML Editor, Visual Site Designer, Web Form Builder, Picture Gallery, Fire Starter,
News Reader, Web Access Manager, Password Wizard

asaruba.com
beholdmyvision.com
User 463058 Photo


Ambassador
1,085 posts
Online Now

Try this code and see if the editor lets you move it around.

<a style="position:absolute; top:100px; left:100px;" href="#null" onMouseOver="imgOn('img1')" onMouseOut="imgOff('img1')"><img src="eyesbut.gif" width="100" height="30" border="0" id="img1" name="img1" alt=""></a>
User 1892988 Photo


Registered User
151 posts

Thanks Gary.

I replaced the existing code with your suggested code, but it didn't gave me the result I was looking for.

...
HTML Editor, Visual Site Designer, Web Form Builder, Picture Gallery, Fire Starter,
News Reader, Web Access Manager, Password Wizard

asaruba.com
beholdmyvision.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.