Announcement

Collapse
No announcement yet.

condition to test whether a page is being displayed as a pop up or not

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    condition to test whether a page is being displayed as a pop up or not

    Is there a way to test whether someone is viewing a page in the main window or as a pop up?

    I'm trying to work out if there is a way I can display something slightly differently to customers who come to my extended info pages from GoogleBase (ie, in their main browser window) or via the main product pages (where the extended info will be a pop up)

    Cheers
    Tracey

    #2
    top of my head, you need to be looking at "window.opener" within javascript.

    you can do something like,
    create a button
    change the onclick ="alert(window.opener);"
    then try it.
    in a "normal page", I THINK?? window.opener is epty, in a popup, it should be the name of the page that caused the popup

    sorry, not tried, but should work.

    Comment


      #3
      ok Kevin
      I kinda understand that...hopefully enough to give it a try anyway!
      Cheers
      Tracey

      Comment

      Working...
      X