|
| What is the syntax for the onmouseover event? |
 |
Tue, 05 Jun 2007 10:43:04 EDT |
In our webfaced app, we have a couple hyperlinks with images setup inside the
APPAREA.
What is the syntax for the onmouseover and onmouseout events to make the image
change when those events occur?
I can add code to make the background color change behind the button, but I can
not get the syntax right to make the actual image change.
Any help would be appreciated
Thank you,
|
| Post Reply
|
| Re: What is the syntax for the onmouseover event? |
 |
Tue, 05 Jun 2007 15:34:58 -040 |
NFCO wrote:
> In our webfaced app, we have a couple hyperlinks with images setup inside
the APPAREA.
>
> What is the syntax for the onmouseover and onmouseout events to make the
image change when those events occur?
>
> I can add code to make the background color change behind the button, but I
can not get the syntax right to make the actual image change.
>
> Any help would be appreciated
>
> Thank you,
>
> Chad
Hi Chad,
There are a lot of ways to do it. My preference would be to define two
styles in a .css file, one for each image and place the image by styling
the area where you want it. Then use the mouse over and mouse out
events to change the style and thus the picture. That is how I did it
for the cmd keys.
Here are a bunch of hits in Google for different ways to do rollovers
with JavaScript.
http://www.google.ca/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aoffic
ial&channel=s&hl=en&q=javascript+rollover&meta=
|
| Post Reply
|
| Re: What is the syntax for the onmouseover event? EXTREMELY |
 |
Thu, 07 Jun 2007 10:15:50 EDT |
For something so simple to do in an HTML page, why doesn't this work in my
Webfacing app?
The initial image shows up just fine, but when I rollover the image, the initial
image is replaced with a little box with a red x in it.
What am I missing????? Here is my code:
<SPAN
onMouseOver="document.pic1.src='G:\WDSCWORKSPACES60\PERMENUWF\WEBCONTENT\WE
BFACING\IMAGES\GENERATED\btnSave2_mouseover.png'"
onMouseOut="document.pic1.src='G:\WDSCWORKSPACES60\PERMENUWF\WEBCONTENT\WEB
FACING\IMAGES\GENERATED\btnSave2_upx.png'">
<IMG
SRC="G:\WDSCWORKSPACES60\PERMENUWF\WEBCONTENT\WEBFACING\IMAGES\GENERATED\bt
nSave2_upx.png" height="50" width="150"
name="pic1">
</SPAN>
Thanks,
|
| Post Reply
|
| Re: What is the syntax for the onmouseover event? EXTREMELY |
 |
Thu, 07 Jun 2007 10:17:11 EDT |
|
| Post Reply
|
| Re: What is the syntax for the onmouseover event? EXTREMELY FRUSTRATED |
 |
Fri, 8 Jun 2007 17:56:29 -0400 |
Chad,
I think that you are referencing the file names incorrectly. Without a
starting slash, the HTTP server assumes the path is relative to the root
directory of the app. I suggest changing SRC to
"webfacing/images/generated/<filename>" (assuming that the image
file is in
a directory named generated). Change it in all three places that src is
used.
Rob
"NFCO" <cholton@nfco.com> wrote in message
news:179338797.1181225781062.JavaMail.wassrvr@ltsgwas009.sby.ibm.com...
> For something so simple to do in an HTML page, why doesn't this work in my
> Webfacing app?
>
> The initial image shows up just fine, but when I rollover the image, the
> initial image is replaced with a little box with a red x in it.
>
> What am I missing????? Here is my code:
>
> <SPAN
>
onMouseOver="document.pic1.src='G:\WDSCWORKSPACES60\PERMENUWF\WEBCONTENT\WE
BFACING\IMAGES\GENERATED\btnSave2_mouseover.png'"
>
onMouseOut="document.pic1.src='G:\WDSCWORKSPACES60\PERMENUWF\WEBCONTENT\WEB
FACING\IMAGES\GENERATED\btnSave2_upx.png'">
> <IMG
>
SRC="G:\WDSCWORKSPACES60\PERMENUWF\WEBCONTENT\WEBFACING\IMAGES\GENERATED\bt
nSave2_upx.png"
> height="50" width="150" name="pic1">
> </SPAN>
>
> Thanks,
>
> Chad
|
| Post Reply
|
|
|
|
|
|
|
|
|
|