Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Publisher / Web Design / December 2005

Tip: Looking for answers? Try searching our database.

Publisher HTML Code Fragment - onmouseover

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DJ - 10 Oct 2005 19:50 GMT
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
Geoffrey - 11 Oct 2005 08:10 GMT
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
David Bartosik - 11 Oct 2005 23:05 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.