JavaScript

Moderators: None (Apply to moderate this forum)
Number of threads: 2058
Number of posts: 5158

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
UGLY,UGLY SCRIPT!!! Posted by Serg1988 on 27 Jan 2002 at 6:36 PM
PLZ EVERYONE!
I NEED HELP!!!
I want to create a script that will do that:
When you putting mouse over an image(Onmouseover)
it changes(Image) and the sound plays once.
So,plzzzz I NEED HELP!
I NEED SCRIPT OR A HINT...I am waiting...Sincerity Serge...
Report
Re: UGLY,UGLY SCRIPT!!! Posted by garwain on 30 Jan 2002 at 6:47 AM
Here is a sample html page that changes an image when the mouse is over it, and restores it when the mouse moves off it. All you need are 2 jpg files named test1 and test2 in the same folder.
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>
<IMG name=image1 src="test1.jpg" 
     onMouseOver="image1.src='test2.jpg';" 
     onMouseOut="image1.src='test1.jpg';">
<P>&nbsp;</P>

</BODY>
</HTML>

Report
Re: UGLY,UGLY SCRIPT!!! Posted by garwain on 30 Jan 2002 at 6:51 AM
Just changed test2.jpg and noticed that if the size is different that the size of the image will change. to keep the image a constant size, use something like:
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>
<IMG name=image1 src="test1.jpg" height=150 width=200 
     onMouseOver="image1.src='test2.jpg';" 
     onMouseOut="image1.src='test1.jpg';">
<P> </P>

</BODY>
</HTML>





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.