picture on hover of link button

G

Guest

I am new to FrontPage and working on a new site. On the home page I would
like to have a central large size image on the page that would "change" as
each link button is hovered, this would display an image from the associated
page related to the link. Suggestions?
 
G

Guest

The term for what you describe is a remote rollever. To achieve this effect:

1. Add the default central large size image to your page in the usual way.
2. Right-click that picture, then choose Picture Properties and click the
Style button.
3. Enter a name such as rover in the ID box, then click OK and OK.
4. Select the picture you want to trigger the image swap.
5. Choose Behaviors from the Format menu.
6. In the Behaviors task pane, click Insert and then select Change Property.
7. When the Change Property dialog box appears, click the Select Element
radio button, then set Element Type to img and Element ID to the name
you assigned in step 3
8. Click Add and then, when the Insert Property dialog box apepars, set
Property Name to src and Property Value to the URL of the replacement
picture.
9. Click OK and OK.
10. In the Behaviors task pane, select the new onclick event, open the
resulting
drop-down list, and select onmouseover.
11. Save the page, then test it and refine.

Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
o--> Microsoft Visual Web Developer 2005 Express Edition: Build a Web Site
Now!
o--> Microsoft Office FrontPage 2003 Inside Out
o--> Microsoft Windows SharePoint Services Inside Out
o--> Faster Smarter Beginning Programming
 
G

Guest

Jim, Thank you for your reply and info. I am a little confused however. In
the site I am creating I will have 3 or 4 photo gallery pages (wife is an
artist) and what I am trying to get to for the home page is a set of
interactive buttons for each page that when rolled over the image that is the
central image on the home page "flips" to the first or a selected image from
the page that corresponds to that interactive button. ex: If one category is
public art, then when that button is rolled over then an image from that
photo gallery page would come up on the home page until the button was pushed
and the viewer is taken to the photo gallery page.
I am not sure I am describing this for you correctly, but I appreciate your
insight and help. Thanks again. Mark
 
G

Guest

I am still not understanding and can't seem to get what I want with this.
The site i am building has a home page with a central image that I would like
to have rollover each time one of the interactive buttons relating to another
page is hovered over. I am not sure if this is the instructions you sent me
or not. For example, the home page would have a large picture of a painting
on it , with interactive buttons for pages that show different types of art
works, i.e. paper, public work, etc. As the viewer moves the mouse over each
of the buttons I would like the large central image to rollover to one of the
images from the corresponding page until they click the button and go to the
photo gallery of that page. This would serve to entice the viewer at the
home page location to move further into the site. Am I making any sense?
Thanks for the help. Mark
 
T

Trevor L.

markp said:
I am still not understanding and can't seem to get what I want with
this.
The site i am building has a home page with a central image that I
would like to have rollover each time one of the interactive buttons
relating to another page is hovered over. I am not sure if this is
the instructions you sent me or not. For example, the home page
would have a large picture of a painting on it , with interactive
buttons for pages that show different types of art works, i.e. paper,
public work, etc. As the viewer moves the mouse over each of the
buttons I would like the large central image to rollover to one of
the images from the corresponding page until they click the button
and go to the photo gallery of that page. This would serve to entice
the viewer at the home page location to move further into the site.
Am I making any sense? Thanks for the help. Mark

I haven't followed this entire thread, but you could try this code, courtesy
of Murray (altered slightly)

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Slideshow Demo</title>
<script language="JavaScript">
<!--
function FP_setLayerText(id,txt)
{//v1.0
var el = FP_getObjectByID(id)
if(el.innerHTML)
el.innerHTML = txt
}

function FP_getObjectByID(id,o)
{// v1.0
var c, el, els, f, m, n
if(!o) o = document

if(o.getElementById)
el = o.getElementById(id)
else if(o.layers)
c = o.layers
else if(o.all)
el = o.all[id]

if(el)
return el

if(o.id==id || o.name==id)
return o

if(o.childNodes)
c = o.childNodes
if(c)
for(n = 0; n < c.length; n++)
{ el = FP_getObjectByID(id,c[n])
if(el)
return el }

f = o.forms
if(f)
for(n = 0; n < f.length; n++)
{ els = f[n].elements
for(m = 0; m < els.length; m++)
{ el = FP_getObjectByID(id,els[n])
if(el)
return el }
}
return null
}
// -->
</script>
</head>

<body>

<div id="layer1"
style="position: absolute; width: 400px; height: 400px;
z-index: 1; left: 200px; top: 30px;
font-family: trebuchet,verdana,arial,sans-serif;
font-size: 14px; font-color: black; background: #FFC;
border: 8px green inset; padding: 15px;">
<img src = "images/0.jpg">
</div>

<p><a href="gallery1.html"
onmouseover="FP_setLayerText('layer1',
'&lt;img src = &quot;images/1.jpg&quot;&gt;')">
<img border="0" src="images/1.jpg" width="100" height="100">
</a></p>

<p><a href="gallery3.html"
onmouseover="FP_setLayerText('layer1',
'&lt;img src = &quot;images/2.jpg&quot;&gt;')">
<img border="0" src="images/2.jpg" width="100" height="100">
</a></p>

<p><a href="gallery3.html"
onmouseover="FP_setLayerText('layer1',
'&lt;img src = &quot;images/3.jpg&quot;&gt;')">
<img border="0" src="images/3.jpg" width="100" height="100">
</a></p>

</body>

</html>

The original image is the one named in <div id="layer1"> (in this case
"images/0.jpg" )

The rollover images are those in the paras below, i.e. images/1.jpg ,
images/2.jpg , images/3.jpg

Just replace images/1.jpg , images/2.jpg , images/3.jpg with your names.
and change gallery1.html , gallery2.html , gallery3.html to the pages with
your galleries on them

This is not quite you want, as it displays thumbnails of the rolllover
images, not interactive buttons, but you can alter this as you wish
 
R

Ronx

The page tells how to set up one button with one image. Repeat for
your other images/buttons. Note that the image being swapped out is
always the same one, the replacement will vary according to the
button.
 
G

Guest

If the main page image is not linked to any button, how can I have that image
change with each button?
 
R

Ronx

Follow the instructions on www.rxs-enterprises.org/tests/rollover.htm
Read carefully instruction #8. Also, make sure that the default image
(the main image that is swapped out) has been given an id in the code:
example
<img border="0" src="../images/frog_eye_3_small.jpg" width="100"
height="64" alt="Image that is swapped" id="img1">

None of the buttons need to link to the main image - but they do need
to link to somewhere, even if its to a void location like <a
href="javascript:;"
 

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

Similar Threads


Top