How do I determine if a page is a MODAL
Is there any way in JavaScript I can see if the page I am loading is a modal?
I know I can see if it's in iframe by doing something like this:
var isInIFrame = window.location != window.parent.location ? true : false;
But I wanted to know if there was code to see if it开发者_StackOverflow was a modal window.
You can check for window.dialogArguments
.
if (window.dialogArguments) {
// modal window
}
Edit: That also applies to showModelessDialog, but if you don't use that function, then this works.
精彩评论