Results 1 to 3 of 3

Thread: dhtml accessing parent's property

  1. #1
    Join Date
    Mar 2008
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default dhtml accessing parent's property

    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

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    From Iframe window. You can access your parent windows variable/objects/elements like the following manner

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

  3. #3
    Join Date
    Mar 2008
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    txh so much codeexploiter

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •