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.
> <input type="image"
> 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?

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
to see it work (hopefully).

<!-- rollover image if script, otherwise normal image. Should have function calls in onmouseover/out? -->
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> ');
// -->
<NOSCRIPT><INPUT type="image" src="button1.gif" border=0></NOSCRIPT>


Reply to this message

Required Details
Your name:

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

Your Message