Change button color on mouseover

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
chaser7016
Forum Commoner
Posts: 34
Joined: Sat Nov 04, 2006 3:22 pm

Change button color on mouseover

Post by chaser7016 »

Burrito | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Ok I have the following simple code that works in Firefox only, but not IE.

Anyone recommend simple IE coding that does the same thing?  My goal is to get this to work in a reg. PC browser, but more importantly through Pocket PC Internet Explorer(Windows Mobile 5.0) on my Smartphone on my website.  PocketPC IE is very basic doesnt support jscript and very little CSS capabilities.

Code: Select all

<STYLE>
INPUT:hover{ background-color: red}
</STYLE>
<HEAD><title>My Site</title>
</HEAD>
<Body BGColor=FFFF99>

<br><INPUT TYPE="BUTTON" NAME="BtnPlay1" VALUE="talk1"
OnClick="StartMeUp('http://www.mysite.com/talk/talk.mp3')">
<INPUT TYPE="BUTTON" NAME="BtnPlay1" VALUE="talk2"
OnClick="StartMeUp('http://www.mysite.com/talk/talk2.mp3')">
</br>
</body>
</html>
Cheers, Chaser


Burrito | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

you may have to use the onMouseOver event. Since you're using onClick anyway, JS doesn't look like an issue:

Code: Select all

<input type="button" value="click me!" onMouseOver="this.style.backgroundColor='#ff0000'" onMouseOut="this.style.backgroundColor=''">
chaser7016
Forum Commoner
Posts: 34
Joined: Sat Nov 04, 2006 3:22 pm

Post by chaser7016 »

Thanks that worked on a regular PC browser, but not in PIE(Pocket PC Internet Explorer). Darn Microsoft why did they make so hard to code for PocketPC Internet Explorer! Why why why..i dont want to do any flash or anything just lite scripting.

Anyone code for a mobile phone browser...smartphone rather like a Treo 700w.

Cheers, Chaser
Post Reply