i know u posted this a while ago and wasnt sure if u found a soultion i had the same problem today i fixed it by applying this.src to the onmouseover/onmouseout attribute instead of defining the whole path (document.imagename.src)
although this only works in IE not in Netscape as apparently netscape see this tag as a submit button not an image
hope you fix it...
jo wrote:
hi there,
Can anyone tell me if there is some rule to placing JS within PHP. I'm still quite new to this programming lark, but can't find anything that solves my problem in the manual or the support sites.
Basically, I want to use a rollover image as a submit button in a form.
The image as a submit button works fine:
<input type="image" name="EditContact" src="Buttons/EditRecord.gif" border="0">
As does the rollover script when placed outside PHP.
<a href="EditContact2.php"
onMouseOver ="document.imgEditRecord.src=EditRecordOn.src"
onMouseOut
"document.imgEditRecord.src=EditRecord.src">
<img src="Buttons/EditRecord.gif" border="0" name="imgEditRecord"></a>
But everything goes belly up when I try to combine the two.
I can't solve this by using frames or anything 'cause it's obviously got to exist within the form.
Please Help...