-
Mouse rollover on a <INPUT TYPE="IMAGE"> tag
I am trying to do a mouse rollover image swap in my form, but I can't seem
to get the INPUT tag to swap images. This is my code...
<FORM METHOD="POST" ACTION="http://www.mysite.com">
...
A LOT of form input stuff
...
<INPUT TYPE="IMAGE" SRC="C:\CreateTeam.gif" WIDTH=100 HEIGHT=20 NAME="createTeam"
onMouseOver="document.createTeam.src='C:\\CreateTeamGlow.gif';" onMouseOut="document.createTeam.src='C:\\CreateTeam.gif';">
</FORM>
When I position my mouse over the image, it says document.createTeam is not
an object. How do I accomplish this?
-
Re: Mouse rollover on a <INPUT TYPE="IMAGE"> tag
I answered my own question...but, in case you're wondering, here's how to
do it...
<FORM METHOD="POST" NAME="myFormName" ACTION="http://www.mysite.com">
...
A LOT of form input stuff
...
</FORM>
<A HREF="javascript:myFormName.submit()" onMouseOver="myImg.src='C:\\CreateTeamGlow.gif';"
onMouseOut="myImg.src='C:\\CreateTeam.gif';"
<IMG NAME=myImg SRC="C:\CreateTeam.gif" BORDER=0>
</A>
"Scott Gines" <nospamscott@impactwd.net> wrote:
>
>I am trying to do a mouse rollover image swap in my form, but I can't seem
>to get the INPUT tag to swap images. This is my code...
>
><FORM METHOD="POST" ACTION="http://www.mysite.com">
>...
>A LOT of form input stuff
>...
><INPUT TYPE="IMAGE" SRC="C:\CreateTeam.gif" WIDTH=100 HEIGHT=20 NAME="createTeam"
>onMouseOver="document.createTeam.src='C:\\CreateTeamGlow.gif';" onMouseOut="document.createTeam.src='C:\\CreateTeam.gif';">
></FORM>
>
>When I position my mouse over the image, it says document.createTeam is
not
>an object. How do I accomplish this?
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