I've added a html code fragment to a web page. I'm trying to do an image
rollover. I have been able to get the onmouseover to work with the
window.status and the alert box but not with replacing an image.
Are there problems with publisher 2002 with document.name.scr?
<a href="" onmouseover="document.logo.scr = 'altlogo.jpg'; return true">
<img src="Logo.jpg" NAME="logo" border="0" /></a>
Thanks
DJ,
I'm not familiar with Publisher 2002, but in P2000 you need to add a
function script, preferably in the head of the HTML document. Pick up a full
script at one the DHTML sites like Dynamic Drive or BNB for instance. You
will find them in Google.
As an alternative you can use a false roll-over which also requires a
function script. You place the base image on the background and put the
roll-over image in a linked image file. The function sets the Alpha filter at
0 and the mouseover resets the filter to 100.
Cheers

Signature
SPQR
> I've added a html code fragment to a web page. I'm trying to do an image
> rollover. I have been able to get the onmouseover to work with the
[quoted text clipped - 5 lines]
> <img src="Logo.jpg" NAME="logo" border="0" /></a>
> Thanks
DJ - 13 Oct 2005 12:15 GMT
SPQR, it worked! Thank you!
> DJ,
> I'm not familiar with Publisher 2002, but in P2000 you need to add a
[quoted text clipped - 18 lines]
> > <img src="Logo.jpg" NAME="logo" border="0" /></a>
> > Thanks
cdub - 13 Dec 2005 15:47 GMT
DJ,
I noticed a small type-o in your script, at ..."document.logo..." you typed
".scr", but probably meant ".src" I changed it, and it worked, just thought
I'd let you know that you were on the right track.
> DJ,
> I'm not familiar with Publisher 2002, but in P2000 you need to add a
[quoted text clipped - 18 lines]
> > <img src="Logo.jpg" NAME="logo" border="0" /></a>
> > Thanks
cdub - 13 Dec 2005 15:53 GMT
DJ,
I also added a bit so that the image will change back with onmouseout:
<a href="" onmouseover="document.logo.src = '/webimage/homebutnon.gif';
return true"
<a href=""onmouseout="document.logo.src='/webimage/homebutnoff.gif'">
<img src="/webimage/homebutnoff.gif" NAME="logo" border="0" /></a></a>
Just change the image names and src's as needed, it works great.
> DJ,
> I noticed a small type-o in your script, at ..."document.logo..." you typed
[quoted text clipped - 23 lines]
> > > <img src="Logo.jpg" NAME="logo" border="0" /></a>
> > > Thanks
99% of Publisher's web publication customers aren't web programming
knowledgable so we don't get into code discussions. I'd recommend you start
by verifying your image path and name is accurate. Then post your code at a
coders forum to get it reviewed. As for Publisher, I don't suspect it would
code non DOM compliant code. Though I might be suspicious of it in the round
trip mode. Meaning if you are not using 2002 SP1 or better and generating the
filtered html output option, then I highly recommend you do so.

Signature
David Bartosik - [MSFT MVP]
http://www.publishermvps.com
http://www.davidbartosik.com
> I've added a html code fragment to a web page. I'm trying to do an image
> rollover. I have been able to get the onmouseover to work with the
[quoted text clipped - 5 lines]
> <img src="Logo.jpg" NAME="logo" border="0" /></a>
> Thanks