1
ghettonet
Browser Determination
  • 2006/4/27 5:11

  • ghettonet

  • Not too shy to talk

  • Posts: 176

  • Since: 2005/12/4


I have a block on my site for users to click and and make my site their start page. The script however, only works on IE, the block contents won't even show up with Fire Fox. I found a script to send users to a different site depending on browser type. How would I make it so that the block itself doesn't show if the visitor uses anything except IE? The block now shows up with nothing in it and thats kind of ugly. Barring that, has anyone heard or seen a better script (for making a button to make the visitors start page my page) that would work with both Fire Fox and IE? This script was all I could find.

2
JMorris
Re: Browser Determination
  • 2006/4/27 5:28

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


I'm not much of a programmer, but I believe you can use the reserved PHP variables to create a conditional statement that will redirect based on browser type. Since PHP is parsed server-side instead of client-side (like JavaScript), this *should* be cross-browser compatible.

But again, I'm not a programmer, but I hope this will at least get you started in the right direction.

Link: PHP Reserved Variables

Also, if you could provide the code you are working with, that might make it a little easier for others to assist you.

Best Regards,

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

3
ghettonet
Re: Browser Determination
  • 2006/4/28 2:01

  • ghettonet

  • Not too shy to talk

  • Posts: 176

  • Since: 2005/12/4


Thanks for the help, i'm not much of a programmer either. I know a bunch of Java - that's what they require here at RIT (to start with). Here is the code I have in a custom block:

Quote:




I found it on hotscripts.com, and it was the closest thing I could find for what I wanted to do.

4
xuser
Re: Browser Determination
  • 2006/4/28 3:07

  • xuser

  • Just popping in

  • Posts: 73

  • Since: 2002/11/26


it looks firefox doesnt support such feature

Login

Who's Online

502 user(s) are online (440 user(s) are browsing Support Forums)


Members: 0


Guests: 502


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits