General discussion

Locked

Javascript help needed

By jtollerson ·
I'm trying to implement the 'rollover highlights' trick demonstrated here:
http://builder.cnet.com/webbuilding/0-7690-8-7819976-1.html

one my own page here:
http://www.arches.uga.edu/~jennat/cheapdate/port.html

I've faithfully copied and pasted the code like a good Javascript thief, and for some reason it refuses to work for me. Any ideas?

Thanks, Jenna

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Javascript help needed

by MadestroITSolutions In reply to Javascript help needed

Well, I went to see the trick (which is no trick at all), and then went to your page. I cant find it anywhere there. In any event, This is a simple rollover that any of todays programs like fireworks and some others can do for you. It is simply changing the image src attribute with the address of another picture, which happens to be the same picture, edited with highlighting on a specific area, saved under a different file name. So Whats the problem?

Collapse -

Javascript help needed

by jtollerson In reply to Javascript help needed

The question was auto-closed by TechRepublic

Collapse -

Javascript help needed

by ryan_j In reply to Javascript help needed

This is a straight copy/paste of the a very simple way of achieving the effect you wanted.
I didn't actually check the source to the original site, so i may have just re-hashed what they used.

Natrually, the formatting will be destroyed, so you'll need to search for any rougue spaces or %20s when you paste. The styles are defines in CSS in the head of the doc, and are very simple to understand, so the whole thing shouldn't present much of a problem.

you need six images named link_ico#.bmp with # being the numbers 1 to 6 (one is the onmouseout image. Btw, when i went to check your site it seemed to be down.

Code below, since it went over the word limit

Good luck!

Collapse -

Javascript help needed

by ryan_j In reply to Javascript help needed

<!-- \\ Crappy javascript onmouseover image thing by Ryan j.
<HTML>
<HEAD>
<STYLE TYPE="text/css">
<!--
A { text-decoration: none; }

A:hover { text-decoration: underline;
color: #FFBF00; }

BODY { background: #143014; }

.linktxt1 { font-family: Arial;
font-size: 12px;
color: #FFFFFF; }


.icostyle { height: 100;
width: 100;
border: 0;
align: absmiddle; }
-->
</STYLE>

<SCRIPT language="JavaScript">
<!--
function linkimg_change(img_name,img_src) {
document.src=img_src;
}
-->
</SCRIPT>
</HEAD>
<BODY>
<DIV CLASS="linktxt1" align="left"><IMG name="linkimg1" class="icostyle" src="link_ico1.bmp" hspace="5"></DIV>
<A href="#" onmouseover="linkimg_change('linkimg1','link_ico2.bmp')" onmouseout="linkimg_change('linkimg1','link_ico1.bmp')"><DIV CLASS="linktxt1"><P>one</P></DIV></A>
<A href="#" onmouseover="linkimg_change('linkimg1','link_ico3.bmp')" onmouseout="linkimg_change('linkimg1','link_ico1.bmp')"><DIV CLASS="linktxt1"><P>two</P></DIV></A>
<A href="#" onmouseover="linkimg_change('linkimg1','link_ico4.bmp')" onmouseout="linkimg_change('linkimg1','link_ico1.bmp')"><DIV CLASS="linktxt1"><P>three</P></DIV></A>
<A href="#" onmouseover="linkimg_change('linkimg1','link_ico5.bmp')" onmouseout="linkimg_change('linkimg1','link_ico1.bmp')"><DIV CLASS="linktxt1"><P>four</P></DIV></A>
<A href="#" onmouseover="linkimg_change('linkimg1','link_ico6.bmp')" onmouseout="linkimg_change('linkimg1','link_ico1.bmp')"><DIV CLASS="linktxt1"><P>five</P></DIV></A>
</BODY>

Collapse -

Javascript help needed

by ryan_j In reply to Javascript help needed

Replace every instance of "& lt;" with "<".

I cuss TechRepublic bad.

Collapse -

Javascript help needed

by jtollerson In reply to Javascript help needed

The question was auto-closed by TechRepublic

Collapse -

Javascript help needed

by jtollerson In reply to Javascript help needed

This question was auto closed due to inactivity

Back to Web Development Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums