-
Images getting me down!
Hi everybody! Before you pass judgement on me as being java incompetent,
I will explain my problem.
I'm trying to create an interface for a webpage where you move the mouse
cursor over a certain image, and it
changes the image of another picture. (Not the same one, I can do that at
least)
I'm new to java and javascript, but I do know c++ (so the syntax is bugging
me)
Any help to this question would save me lots and lots of mental anguish!
Thank you!
- Heather
-
Re: Images getting me down!
"Heather" <black_minuit@hotmail.com> wrote:
>
>Hi everybody! Before you pass judgement on me as being java incompetent,
>I will explain my problem.
>I'm trying to create an interface for a webpage where you move the mouse
>cursor over a certain image, and it
>changes the image of another picture. (Not the same one, I can do that at
>least)
>I'm new to java and javascript, but I do know c++ (so the syntax is bugging
>me)
>Any help to this question would save me lots and lots of mental anguish!
>
>Thank you!
>
>- Heather
Hi Heather,
I'm not an expert on this stuff either, but I just finished doing what you're
asking about on
a site I did for a friend using Javascript. First of all, let me direct
you to Dr. Joe Burn's
htmlgoodies.com (there's also a javagoodies.com). Look for a tutorial on
image flips or
double-image flips.
Besides that, what I did was define a image map for a navigation pane. When
a user's mouse goes
over one of the "mapped" areas on the pane, the image in the middle of the
screen changes.
To do this, first define an image map <MAP Name="myMap">
Next map the area...
<AREA SHAPE=RECT COORDS="61,0,120,20" HREF="history/index.html"
onMouseOver="document.images[8].src='history.jpg';"
onMouseOut="document.images[8].src='fellowship.jpg';"
>
Sorry if you already know about all that. The only other thing is notice
the events..."document.images[8].src....."
There's probably a better way to do this, but this works. Everytime you
put a component or an image on a
page, it's stored in an array. So, you can access the image you want by
figuring out what index # it is in
the document's array. Then just change the source.
Hope this is of some help
Brent
-
Re: Images getting me down!
"Brent" <bhorne@usa.net> wrote:
>
>"Heather" <black_minuit@hotmail.com> wrote:
>>
>>Hi everybody! Before you pass judgement on me as being java incompetent,
>>I will explain my problem.
>>I'm trying to create an interface for a webpage where you move the mouse
>>cursor over a certain image, and it
>>changes the image of another picture. (Not the same one, I can do that
at
>>least)
>>I'm new to java and javascript, but I do know c++ (so the syntax is bugging
>>me)
>>Any help to this question would save me lots and lots of mental anguish!
>>
>>Thank you!
>>
>>- Heather
>
>
>Hi Heather,
>I'm not an expert on this stuff either, but I just finished doing what you're
>asking about on
>a site I did for a friend using Javascript. First of all, let me direct
>you to Dr. Joe Burn's
>htmlgoodies.com (there's also a javagoodies.com). Look for a tutorial
on
>image flips or
>double-image flips.
>
>Besides that, what I did was define a image map for a navigation pane.
When
>a user's mouse goes
>over one of the "mapped" areas on the pane, the image in the middle of the
>screen changes.
>To do this, first define an image map <MAP Name="myMap">
>Next map the area...
>
> <AREA SHAPE=RECT COORDS="61,0,120,20" HREF="history/index.html"
> onMouseOver="document.images[8].src='history.jpg';"
> onMouseOut="document.images[8].src='fellowship.jpg';"
> >
>
>Sorry if you already know about all that. The only other thing is notice
>the events..."document.images[8].src....."
>There's probably a better way to do this, but this works. Everytime you
>put a component or an image on a
>page, it's stored in an array. So, you can access the image you want by
>figuring out what index # it is in
>the document's array. Then just change the source.
>Hope this is of some help
>
>Brent
>
Thank you so much Brent!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks