Berislav Lopac schreef:[color=blue]
> Mattias Campe wrote:
>[color=green]
>>Martin Lucas-Smith schreef:
>>[...]
>>[color=darkred]
>>>However, I would implore you to consider why you need to do browser
>>>sniffing. Is it *really* necessary for what you are trying to
>>>achieve?[/color]
>>
>>It's not *really* necessary, but without it, the users of IE6.0 can't
>>select anything on
http://student.ugent.be/astrid/bewoners.php
>>(strange, but with IE5.x it worked), just because I had the following
>>on top of my webpage:
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>
>>So I needed code that omitted the DOCTYPE when IE was used and that's
>>how I stumbled across get_browser. Of course, I have to other options
>>that don't need the browser sniffing:
>>
>>(1) I just ignore the IE users. But although I really dislike IE (not
>>because it's from Microsoft, but because IE doesn't evolve together
>>with the webstanders), I can't ignore those users :-/.
>>
>>(2) I *always* omit the DOCTYPE. But then my page isn't W3C compliant.[/color]
>
> (3) Learn a bit more about the IE6 DOCTYPE switch and adapt your Javascript
> or CSS (which probably causes the trouble) accordingly:
>
http://msdn.microsoft.com/library/en...ments.asp?fram
> e=true#cssenhancements_topic2[/color]
(1) When I didn't had any Javascript on my website, I didn't had the
problem => JavaScript doesn't cause the trouble
(2) The CSS-file validates correctly
(
http://jigsaw.w3.org/css-validator/v...re%2Fnieuw.css)
=> CSS doesn't cause the trouble (or it should be that the w3c validator
is wrong). I appreciate the link that you gave me, but it's too much
work to read through the msdn, mozilla, khtml and opera pages to see how
they handle their pages, that's why I (mostly) only check if the
(html/CSS)page validates correctly with the w3c and that's (in my humble
opinion) the way it should be.
[color=blue]
> BTW, I am not sure what you mean by 'select' in your statement above -- the
> page works equally to me on IE6 and Firefox.[/color]
That's because I already omitted the DOCTYPE through some browser
sniffing, now I included it again, so you can see it doesn't work on
IE6:
http://student.ugent.be/astrid/bewoners.php
[color=blue]
> If it behave differently on IE5, then the problem is not in PHP, but your
> HTML/CSS/Javascript.[/color]
In my opinion, that's a little bit to fast for a conclusion, I think
it's a problem in IE6 ;)
Greetings,
Mattias