Image submit with mouse over
| From: | Skip Evans | Date: | Fri, 14 Jul 2006 23:13:04 +0000 |
| Subject: | Image submit with mouse over | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-239493@lists.php.net to get a copy of this message | ||
Hi all,
Brand new to the list, so here's my question. I am implementing a bunch of Dreamweaver templates a designer has built into a PHP app, and one thing she did is create a submit button (image) that uses mouse over JS:
<a href="user.php?req=login" target="_top" onMouseOver="MM_swapImage('signin','','/theme/images/admin/button_signin2.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="/theme/images/admin/button_signin.gif" alt="Sign In" name="signin" width="86" height="20" border="0"></a>
But notice this is an href, and it also needs to submit $_POST data through a couple of form fields that appear above. So what I tried to do in order to be able to retrieve the POST data on the receiving end was convert it to the following:
<input type="image" src="/theme/images/admin/button_signin.gif" onfocus="MM_swapImage('signin','','/theme/images/admin/button_signin2.gif',1)"
onblur="MM_swapImgRestore()">
...However, the onfocus and onblur are not swapping out the images, as I had hoped. (Against all odds, maybe I should add.)
I know the client will pout and sniffle if they don't get their mouse over affect, so I am hoping for a solution.
Any suggestions would be greatly appreciated.
Thanks!
--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240