Results 1 to 2 of 2

Thread: Getting at javascript methods and variable a single level up instead of from 'parent'

  1. #1
    Join Date
    Oct 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Getting at javascript methods and variable a single level up instead of from 'parent'

    1) Script Title:
    DHTML Modal window v1.1

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...dhtmlmodal.htm

    3) Describe problem:
    We're using this in a fashion where we can have popups within popups. The problem is, in a 2nd level popup we need to be able to manually close the popup just one level up. We also need to be able to execute the javascript methods that are included in just one level up. Currently, the following snippet will work if there is not more than one level:
    if (parent != null && parent.IsFormDirtyParent() == false) {
    parent.modalPopupVar.hideforce();
    return true;
    }

    But any idea how to access just one level up (as parent is going all the way to the top). I hope this makes since and there is a way .

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,924
    Thanks
    43
    Thanked 3,187 Times in 3,151 Posts
    Blog Entries
    12

    Default

    If parent goes all the way to the top, you are using it wrong, or in the wrong place. The parent object is always one level up. It's the top object that always goes all the way to the top.

    There is no:

    IsFormDirtyParent()
    In any of the scripts associated with DHTML Modal window v1.1. Perhaps that's what's messing you up. But without seeing the page, I'm only guessing.

    If you want more help:

    Please post a link to a page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •