How to write a JS to check if a page is loaded by a normal page or a modeless window?

I have a page which will be loaded by some normal windows and some modeless windows, and I want to show different message in this page to these two situations.

I have thought about to check the existence of parent window, but it fails as a normal page can also have a parent window while loaded after a click on a link or button.

Please help, any hints will be appreciated. Thanks in advanced.

  • What exactly is your definition of "modeless?" Nathan Duran almost 9 years ago
  • Thanks for your comment and sorry for my unclear description. Saying "modeless windows" I mean that a window which is opened by JavaScript method " window.showModalDialog() ". huiyubird almost 9 years ago

1 answer

Mottie 1134
0
points

I don't know if this will work, but maybe check for a returnValue (ref)?

Is there a reason why you are using a function that only works for IE?

Answered almost 9 years ago by Mottie