This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Microsoft Publisher > December 2005 > Publisher HTML Code Fragment - onmouseover
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Publisher HTML Code Fragment - onmouseover
|
|
|
| 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 2005-10-11, 3:18 am |
| 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
--
SPQR
"DJ" wrote:
> 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
| |
| David Bartosik 2005-10-11, 6:34 pm |
| 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.
--
David Bartosik - [MSFT MVP]
http://www.publishermvps.com
http://www.davidbartosik.com
"DJ" wrote:
> 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
| |
|
| SPQR, it worked! Thank you!
"Geoffrey" wrote:
[color=darkred]
> 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
> --
> SPQR
>
>
> "DJ" wrote:
>
| |
|
| 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.
"Geoffrey" wrote:
[color=darkred]
> 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
> --
> SPQR
>
>
> "DJ" wrote:
>
| |
|
| 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.
"cdub" wrote:
[color=darkred]
> 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.
>
> "Geoffrey" wrote:
>
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|