...

View Full Version : Clicking a button OUTSIDE an iframe



StealthRT
05-23-2009, 05:17 AM
Hey all i am trying to "click" a button thats outside of the iframe (on the main page)..

I can not seem to get it working... here is the code


Basic.html
===============
<iframe width="600px" height="250px" id="infoFrame" name="infoFrame" src="test.html" scrolling="no" frameborder="0"></iframe>
<input name="closeSlide" id="closeSlide" type="button" onclick="$('.btn-slide2').click();" />



test.html
===============
<input name="close" type="button" onclick="parent.document.getElementById('closeSlide').Click();" />

Any help would be awesome!

David

randomuser773
05-23-2009, 04:57 PM
<input name="close" type="button" onclick="parent.document.getElementById('closeSlide').onclick();" />



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum