Kanishka Panamaldeniya
Kanishka Panamaldeniya

Reputation: 17586

how to keep browser mode unchanged in IE9 php

hi i have a trouble when using my site in IE9 . the thing is

i have the browser mode:IE9 , document mode:IE9 .

i open a new browser popup window . that window's browser mode change to IE8 , document mode to Quirks . that makes the site to log out .

enter image description here

is there a way to keep browser mode unchanged by PHP or JavaScript or HTML.

i am using window.open(data, 'Gmail', 'height=500,width=500'); to open a new window

please help.......................................

UPDATE

after successfully authenticating the friend list is shown an i can invite them to my site

enter image description here

in IE

enter image description here

site logs out .

Upvotes: 0

Views: 798

Answers (1)

Damien Pirsy
Damien Pirsy

Reputation: 25445

Well, when you call a popup window you are calling an URL; if the url is an external site, it's up to them; but looking at your picture, looks like its a custom page containing a sort of OpenID? So, if is really a custom page, you must be using a controller for that.

Well, in that controller, load a view which contain a valid html header with the correct DOCTYPE (maybe use the html 5 <DOCTYPE! html>). It might be that your popup page is just an html snippet, not a full page. Make it a valid html page and you should be fine.

If you're intersted, CI has the anchor_popup() function in the URL helper which helps you building popups, and by using that you see at once that your called page is a controller (the first parameter is the url, either a full one or a CI's one ["controller/method"].).

UPDATE after your last comment.
The external page doesn't contain a DOCTYPE at all, so your browser will render it as he likes. But you made me think twice on the question: the page is a Google OpenID page, how exactly does THAT log out YOU on your site?? it's external and not part of your system..Of course in Google page you're not authenticated! Or do you mean that when the popup is called, on your site you get disconnected (for no reason) ? And when it happens?

UPDATE 2

I got it. The problem is that the redirect to your site happens within the popup, which is a page you cannot control at this time, since started as an external url.

If you want to take it, here's my piece of advice: don't use popups , for 3 main reasons:

  • they might get blocked by a user. Pop-up blockers are a common browser tool even for non-techy users
  • You lose control on the page, as you can see, when it's external.
  • They were the latest rage 10 years ago, now we have other more elegant and cool solutions :)

One of theese is don't providing a popup. Even SO doesn't do that, it just directs you to the OpenID provider, and redirects you back when the response is ok. It's much better and not frustrating for the user (and for you!). Otherwise, you might achieve the same functionality of a popup with a lightbox, in where you load the external site inside a div or a frame, but I'm not sure wheter this will work as expected or not.
My suggestion is to go with a simple redirect to and fro the google page.
Easy, clean, and no headaches.

Upvotes: 1

Related Questions