Detecting browser settings
Author
Discussion

LeoZwalf

Original Poster:

2,802 posts

261 months

Wednesday 10th January 2007
quotequote all
Hi,

I am working with a website which requires popups and certain other settings to be enabled.

Does anyone know if there a way of detecting a users settings so we can, for example, show a message telling them they need to enable popups, Java or whatever they have disabled?

Thanks in advance,
Leo

percy flage

1,770 posts

253 months

Wednesday 10th January 2007
quotequote all
I thought the browser did that for you? Opera seems to tell me if a pop up has been blocked - I use vBulletin forum software a lot and that does.

LeoZwalf

Original Poster:

2,802 posts

261 months

Wednesday 10th January 2007
quotequote all
Hi, thanks for the reply.

Maybe I worded my question badly - I am building a web page and I need to detect settings of the users who visit the site so I can display a message on the page saying something like "You have popups disabled - to view and use the site properly please enable popups".

Is there some code I can put on the web page which can detect the settings?

Thanks again,
Leo

ThePassenger

6,962 posts

266 months

Wednesday 10th January 2007
quotequote all
I suspect, if you poke around the development docs for IE7 you will find that most of it's features can be detected or changed via ActiveX modules. However, I don't really think you could do the same trick with FF or Opera.

I've seen a lot of sites that simply have "If you're running a pop-up blocker then..." text on them, which seems to be the way to do it.

FunkyGibbon

3,863 posts

295 months

Wednesday 10th January 2007
quotequote all
www.cyscape.com/Default.aspx?bhcp=1 claims to do it for you

chrisbr68

5,500 posts

279 months

Wednesday 10th January 2007
quotequote all
With Javascript, you can run code within <script> or <noscript> tags, and one or the other will display depending on if its enabled or not. Not sure about the pop ups though. Good luck!

J_S_G

6,177 posts

281 months

Friday 12th January 2007
quotequote all
What you can do is try to open the pop-up. Then with JavaScript, try to get a reference to the window. If it's null, then the popup's not occured, and you can show a dialog box/show a (previously hidden) bit of content on the screen (display:none; -> display:; or similar in CSS) to let visitors know they need to enable popups.

chrisbr68

5,500 posts

279 months

Saturday 13th January 2007
quotequote all
J_S_G said:
What you can do is try to open the pop-up. Then with JavaScript, try to get a reference to the window. If it's null, then the popup's not occured, and you can show a dialog box/show a (previously hidden) bit of content on the screen (display:none; -> display:; or similar in CSS) to let visitors know they need to enable popups.


Good thinking, I was wondering about something like this myself although Ive never done this before.