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:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* 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
Go Back   Tech Support Forum > Design Forum > Web Design & Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read

Web Design & Programming Discussion of web design, and server-side & client-side scripting

Reply
 
Thread Tools
Old 07-24-2008, 04:42 AM   #1 (permalink)
Registered User
 
Join Date: Jun 2008
Posts: 18
OS: windows vista


Question OnMouseOver

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
burnboy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 07-24-2008, 05:53 AM   #2 (permalink)
Registered User
 
Join Date: Jul 2008
Posts: 3
OS: Vista


Re: OnMouseOver

you forgot an " after the onmouseout

Quote:
<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">
Phelms215 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 07-24-2008, 08:18 AM   #3 (permalink)
Visitor, Security Team
 
jpshortstuff's Avatar
 
Join Date: Jun 2008
Location: England
Posts: 12
OS: Windows XP Media Center SP3


Re: OnMouseOver

Quote:
Originally Posted by burnboy View Post
OnMouseOver="document.normcontroller. scr='ps3-controller-fin-lopside.gif'"
Is that any help?
jpshortstuff is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 07-24-2008, 10:20 AM   #4 (permalink)
Design Team Member
 
jamiemac2005's Avatar
 
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">
You don't need to reference the image using document.blah if your handler is within the element. and as previously stated the quote was missing, you also put a semicolon outside of the dblquotes (")

Cheers,
Jamey
__________________

Help fight cancer. < I just started =]
jamiemac2005 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 07-25-2008, 02:33 AM   #5 (permalink)
Registered User
 
Join Date: Jun 2008
Posts: 18
OS: windows vista


Re: OnMouseOver

hi all and thanks!
brain working a bit better now but its still a little early!!!
J, could i copy that or is it just to sho me?????
lol
call me a lazy sod!!!!!!!!
burnboy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 07-25-2008, 03:43 PM   #6 (permalink)
Design Team Member
 
jamiemac2005's Avatar
 
Join Date: Jul 2007
Location: Northampton, UK
Posts: 1,090
OS: Win Vista Home Premium & Ubuntu Hardy(8.04)


Re: OnMouseOver

lol, i'm pretty sure you could copy anything here, feel free to

Cheers,
Jamey
__________________

Help fight cancer. < I just started =]
jamiemac2005 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 07-28-2008, 01:40 AM   #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 !!!!!!)
burnboy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 07-28-2008, 03:33 AM   #8 (permalink)
Design Team Member
 
jamiemac2005's Avatar
 
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
__________________

Help fight cancer. < I just started =]
jamiemac2005 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 07-29-2008, 12:58 AM   #9 (permalink)
Registered User
 
Join Date: Jun 2008
Posts: 18
OS: windows vista


Re: OnMouseOver

thanks guys!!
i'll take all of your advice but on this 1 i think i'll just ask my dad!!!
LOL
thanks aswell
burnboy
burnboy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -7. The time now is 03:56 PM.



Copyright 2001 - 2008, Tech Support Forum

Search Engine Friendly URLs by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82