![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Jun 2008
Posts: 18
OS: windows vista
|
hi all
sota having problem, bu im just a bit brain dead at the moment ive got some code, but for sum (probably obvious!) reason it wont work! heres the code: <img border="0" src="ps3-controller-fin.gif" width="40%" height="40%" name="normcontroller" OnMouseOver="document.normcontroller.scr='ps3-controller-fin-lopside.gif'" ; OnMouseOut="document.normcontroller.src='ps3-controller-fin.gif'; align=" align="left"> it basically tells one pic turn to another when mouse is over any and all help welcome Burnboy |
|
|
|
|
|
#2 (permalink) | |
|
Registered User
Join Date: Jul 2008
Posts: 3
OS: Vista
|
Re: OnMouseOver
you forgot an " after the onmouseout
Quote:
|
|
|
|
|
|
|
#4 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Northampton, UK
Posts: 1,090
OS: Win Vista Home Premium & Ubuntu Hardy(8.04)
|
Re: OnMouseOver
Okay, heres how i'd see the code working:
Code:
<img border="0" src="ps3-controller-fin.gif" width="40%" height="40%" name="normcontroller" OnMouseOver="this.src='ps3-controller-fin-lopside.gif';" OnMouseOut="this.src='ps3-controller-fin.gif';" align=" align="left"> Cheers, Jamey |
|
|
|
|
|
#7 (permalink) |
|
Registered User
Join Date: Jun 2008
Posts: 18
OS: windows vista
|
Re: OnMouseOver
kl thanks
just tell my still why this wont work???: <img border="0" src="ps3-controller-fin.gif" width="40%" height="40%" name="normcontroller" OnMouseOver="document.normcontroller.scr='ps3-controller-fin-lopside.gif'"; OnMouseOut="document.normcontroller.src='ps3-controller-fin.gif'"; align="left"> (ps why do i always come here in the morning!!!!- half the time i have no clue what I'M doing !!!!!!) |
|
|
|
|
|
#8 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Northampton, UK
Posts: 1,090
OS: Win Vista Home Premium & Ubuntu Hardy(8.04)
|
Re: OnMouseOver
In theory it should work, but it's a best practice to use "this" as the identifier when you're writing event handlers from the object that you're modifying.
If that didn't work you may have had to use "document.all.normcontroller"/"document.body.normcontroller" but i can't remember which because it's been a while since i coded in that way... And it depends on the browser being used to test the code (because different browsers will handle that code differently (and some will ignore it). When identifying elements the name attribute is supposed to be going out the window. I'd suggest using an id="normcontroller" and then the code "document.getElementById('normcontroller');" to identify the code in javascript. Because most browsers understand that code. Cheers, Jamey |
|
|
|
![]() |
| Thread Tools | |
|
|