PDA

View Full Version : dhtml accessing parent's property



swingtrader
03-28-2008, 11:24 AM
1) Script Title: DHTML Window widget (v1.1)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/

3) Describe problem: i'm using the dhtmlwindow, contentsource using iframe type, calling a page. Now can this page (that i called inside the iframe) access variables/objects on it's parent?accessing it's parent properties?
thx anyway

codeexploiter
03-28-2008, 11:39 AM
From Iframe window. You can access your parent windows variable/objects/elements like the following manner


var a = parent.window.myParentWindowVariable;
var b = parent.window.document.getElementById('mydiv');

swingtrader
03-31-2008, 04:31 AM
txh so much codeexploiter