PDA

View Full Version : how to change an iframe with button rollover



DesignerNic
09-22-2010, 04:53 PM
Is it possible to change an iframes content by rolling over a button (not clicking?) I don't know how to write the JS for this.

thank you!!

molendijk
09-22-2010, 10:36 PM
<iframe name="my_iframe" src="http://www.google.com"></iframe>
<br>
<button onmouseover="window.frames.my_iframe.window.location.replace('http://www.dynamicdrive.com')">dynamicdrive</button>
<button onmouseover="window.frames.my_iframe.window.location.replace('http://www.google.com')">google</button>
Arie Molendijk.