Javascript question

M

MikeR

Not an FP issue per se, but I hope someone can set me straight.
In an effort to get rid of hover buttons, I added a couple of .jpgs
(buttons) and got a JS rollover script from the net.
In FF:
When the page loads, I see the text from the alt tag. The button doesn't
show up until a mouseover, and then operates as expected.
In IE:
When the page loads, the boxed red 'X' shows. The button doesn't show up
until a mouseover, and then operates as expected.
The URL is nf4l.com
TIA
Mike
 
M

Murray

This is a bad start for your page -

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<HEAD>

You need an <html> tag up there, e.g.,

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<HEAD>

This image is not on the server -

<IMG NAME="img1" SRC="mages/details_off.jpg" ALT="Dx" HEIGHT="15"
WIDTH="147" VSPACE="0" HSPACE="0" BORDER="0">

and so it doesn't appear when the page loads. Yet, this rollover -

<A HREF="dxdevil.htm" onMouseOver="imgOn('img1')"
onMouseOut="imgOff('img1')">

forces the correct image to load once the new image has been rolled in. You
need to correct the typo in the image's source link from "mages/..." to
"images/...".

You didn't need to go outside of FP to create these rollovers, you know?
 
M

MikeR

Murray -
What an eye! I'd looked at that til I couldn't see it. Thanks! Would you
explain "You didn't need to go outside of FP to create these rollovers,
you know?" cuz no, I didn't know.
Thanks,
Mike
 
M

Murray

You can just do an image swap behavior on the upstate images. Select the
image, apply the image swap behavior to swap in the rollover image
onMouseOver, and to restore it onMouseOut. Bada (as they say) bing, bada
boom.
 
M

MikeR

Murray -
I KNOW this is in English, but I'm suffering from an acute case of
thick-as-a-brick. I went badda flop. More detail please?
Thanks,
Mike
 
M

Murray

8)

You need a pizza.

Select the upstate image on the Design view of FP2003. Use FORMAT |
Behaviors > Insert > Swap Image, and browse to and select the image to roll
in onMouseOver.

Do this for each desired rollover.

Bada bing?
 
M

MikeR

And a beer or 3. I'm using FP2002, and it's a slightly different route
to the effect, but I found it (Format|Dynamic HTML effects). Kewl! What
a wad of iccomprehensibility it sticks in, but the effect works in IE &
FF. I'm guessing the functions dynAnimation() {}
and clickSwapImg() {} are part of the FP extensions?

I also found a way to do it inline in the OnMousex call. I used the
DHTML on the Password Bank link, if you wanna see the differences.

Bada BING!
Thanks again,
Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top