silha
asked on
Rollover (MouseOver) graphics in a 'Form'
Does anybody know how to get rollover graphipcs to work inside of a form?
I can assign a graphic as a button without a problem, and then assign the appropriate command to that button; 'submit' etc, but I make them into rollover (image swap).
I've tried the default rollover graphic code from Dreamweaver as well as some custom Javscript but no dice..
Is it even possible?
I can assign a graphic as a button without a problem, and then assign the appropriate command to that button; 'submit' etc, but I make them into rollover (image swap).
I've tried the default rollover graphic code from Dreamweaver as well as some custom Javscript but no dice..
Is it even possible?
which programming language are you working in silha? PHP? ASP? do you really want to try and do it with javascript??
You have to use a regular image with events:
<img src="mouseout.gif" onmouseover="this.src='mou seover.gif '"
onmouseout="this.src='mous eout.gif'" onclick="document.forms[0] .submit()" >
Cd&
<img src="mouseout.gif" onmouseover="this.src='mou
onmouseout="this.src='mous
Cd&
darksinclair said:
"which programming language are you working in silha? PHP? ASP? do you really want to try and do it with javascript??"
Darksinclair: Such a task can only be accomplished in client side scripting such as Javascript or Flash. PHP and ASP are server-side, so once the page has been sent, the server does not have any influence tp what the user chooses to do on his/her system.
"which programming language are you working in silha? PHP? ASP? do you really want to try and do it with javascript??"
Darksinclair: Such a task can only be accomplished in client side scripting such as Javascript or Flash. PHP and ASP are server-side, so once the page has been sent, the server does not have any influence tp what the user chooses to do on his/her system.
ASKER
Correct... it MUST be client side... (that much I know) and which is why I was trying JavaScript in the first place.
I will attempt to use the code from COBOLdinosaur, but I'm not optinistic as I wrote some very similar code a few days ago that didn't work... COBOLdinosaur's code however is sufficiently different enough to try.
I'll post the results here either way..
Thanks to all, any further comments are appreciated.
Regards,
-Silha
PS.. the source files in question are PHP.. (for those who asked...)
I will attempt to use the code from COBOLdinosaur, but I'm not optinistic as I wrote some very similar code a few days ago that didn't work... COBOLdinosaur's code however is sufficiently different enough to try.
I'll post the results here either way..
Thanks to all, any further comments are appreciated.
Regards,
-Silha
PS.. the source files in question are PHP.. (for those who asked...)
There's nothing wrong with Cd's script. If implemented correctly, it should definitely work. Just watch for those quote mixups, especially if you're echoing with PHP.
hello!
as i remember we can use images instead of submit buttons, try this:
<input type="image" src="img1.ext" onMouseOver="this.src='img 2.ext'" onMouseOut="this.src='img1 .ext'>
as i remember we can use images instead of submit buttons, try this:
<input type="image" src="img1.ext" onMouseOver="this.src='img
ASKER
Maybe I'm just technically impaired on this one... I just can't get the code above to work... (and it looks as if it should!)
Below is a line from my current page (using a stand graphic as a button in a form) the 'rollover' graphic would be /image/Buttons/save-n-clos e_hvr.gif
<input name="btnContinue" type="image" id="btnContinue" value="Continue" src="/image/Buttons/save-n -close.gif " alt="Continue Button" width="148" height="37" border="0">
Below is a line from my current page (using a stand graphic as a button in a form) the 'rollover' graphic would be /image/Buttons/save-n-clos
<input name="btnContinue" type="image" id="btnContinue" value="Continue" src="/image/Buttons/save-n
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OH MY GOD! <it works!>
Required a little fine tuning but this appaears to be it!!!
<input name="btnContinue" type="image" id="btnContinue" title="Continue Button" onMouseOver="this.src='/im
Thanks to everybody for their input!
-E
not at all