Your code snippet has an extra closing brace:
Code:
var test123=dhtmlmodal.open("agreebox", "iframe", "location.do?method=selectlocation&readPreview=3", "This Page's Terms of service", "width=590px,height=450px,center=1,resize=1,scrolling=0");
test123.onclose=function(){
// need to do some operation
}
}
This implies that it's part of a function, perhaps even an onload function.
In any case, if that brace were there without its being part of a function, it would cause a fatal scripting error and the modal wouldn't even load.
So that means that you are declaring test123 in a limited scope, one not available by doing parent.anything from the iframe.
You need to get it out of that function, or declare the variable globally. The latter would be easier:
Code:
window.test123=dhtmlmodal.open("agreebox", "iframe", "location.do?method=selectlocation&readPreview=3", "This Page's Terms of service", "width=590px,height=450px,center=1,resize=1,scrolling=0");
test123.onclose=function(){
// need to do some operation
}
}
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.
Bookmarks