Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
03-06-2012, 02:33 PM #1
- Join Date
- Jan 2012
- Thanked 0 Times in 0 Posts
Cross Frame Scripting of Onclick Event Handler
How do I target a div, in this case <div id=‘PF_Text_Panel’>’, in an iframe using and onclick event in the parent document.
I have a document, the parent page, containing 1 iframe. The parent page also contains some general information and the navigation links. The links refer to unique .html files, child pages, which are slideshows of jpeg images of different architecture projects of mine. Clicking on a project navigation links loads a slideshow in the iframe.
The following is a snippet of how I would image the parent page onclick event handler to look like but with some additional code in the Slide_1T() portion:
<div> <a href="#" onclick=" Slide_1T(parent.frame.getElementbyId(‘PF_Text_Panel’);">(TOGGLE TEXT PANEL)</a> </div>
03-06-2012, 07:21 PM #2
- Join Date
- Sep 2005
- Sydney, Australia
- Thanked 693 Times in 682 Posts
Thet code should work provided both web pages are on the same domain.