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

10-27-2010, 03:58 PM
1) Script Title:
DHTML Modal window v1.1

2) Script URL (on DD):

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) {
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 :).

10-27-2010, 05:05 PM
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:


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.