Hi everybody,
My colleague has a function that starts with
var pBlk=parent.document.getElementById('spnStat');
if(!pBlk||pBlk.InnerHTML.match("Edit")) {
Actually, I tried to change it a bit, I added InnerHTML on the second line (it was originally
var pBlk=parent.document.getElementById('spnStat').InnerHTML;
The page can be called from one page, that has spnStat element or it can be called using window.open method in JavaScript. In the second case I'm getting a JavaScript error 'not an object'.
My question is - would the calling object be called parent in this case or as my colleague told me it would be called opener. If that's the case, how can I modify the above code to avoid an error? I can probably put this in try/catch block, but is it the only solution?
Thanks a lot in advance.
If it's not broken, fix it until it is.
My Blog