deadlock Message Board
[ February Full List | Reply ]

Re: Tricky OnMouseOver q.
From Jonathan at Acorn Lodge Holiday Accommodation - Bushmills on 21 Feb '00
replying to Tricky OnMouseOver q. posted by Mark Pakula

>heya, i have a tricky problem. i want to do an onmouseover image change, but the image is in an input, not an IMG tag.
>eg:
> <input type="image"
>
value="bob"
> name="Image3" border="0" src="images/bob.gif"
> width="104" height="14" onClick="startSearchbob()">
>
>Ive tried just about every combo ive seen,
>and most only work on IMG or A href tags.
>Can anyone help?
>
>.Mark.

You can use "document.theformsname.submit()" to submit the form from an anchor tag. Probably not the best solution, but it seems to work with NN4/IE5. Click
http://www.acornlodge.net/test/testform.html
to see it work (hopefully).

<!-- rollover image if script, otherwise normal image. Should have function calls in onmouseover/out? -->
<SCRIPT><!--
document.write('<A href="javascript:document.theform.submit()" onmouseover="theimage.src=\'button2.gif\'"; onmouseout="theimage.src=\'button1.gif\'">
<IMG src="button1.gif" name="theimage" border=0></A> ');
// -->
</SCRIPT>
<NOSCRIPT><INPUT type="image" src="button1.gif" border=0></NOSCRIPT>

Jonathan.




Reply to this message

Required Details
Your name:
Subject:

Optional Details
Home page title:
Home page URL:
Email:
(if you'd like to receive automatic replies by email)

Your Message