PDA

View Full Version : Dual Image flips question (inside a form field)


lavi557
11-02-2002, 09:55 AM
Ok. I want to do a dual image flip. I have a script from another site however it has an error. Which is surprising considering the guy who wrote it usually fixes any errors.

http://webdeveloper.earthweb.com/webjs/jsimage/article/0,,12746_639271,00.html#thescript

thats the site. So if could someone could possibly point why it might have an error or a better dual image flip script it would be greatly appreciated.
Now my other question is a bit more technical. While I know dual image flips are possible, is it possible to make one work in-side of a form button. I have a form with hidden fields to move between .php and I was wondering if it was possible to make a dual image script take effect having the form button (or image) as the main link. Any suggestions?

Mr J
11-02-2002, 04:04 PM
Have a play with this

Change the images to your own ie, epic1.gif etc



<script language="JavaScript">
<!--

function ON(picon){
oDIV1.innerHTML="<img src='"+ picon +"'>"
}

function OFF(picoff){
oDIV1.innerHTML="<img src='"+ picoff +"'>"
}

// -->
</script>

<input type="button" value="BUTTON 1" onmouseover="ON('epic2.gif' )" onmouseout="OFF('epic1.gif')">

<input type="button" value="BUTTON 2" onmouseover="ON('epic3.gif' )" onmouseout="OFF('epic1.gif')">

<div id="oDIV1"></div>