detecting opera ? and more..

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • raptor

    #1

    detecting opera ? and more..

    hi,

    how to detect opera..it seems that even opera8 doesnt support
    xmlhttp fully (.i.e. sendRequestHead er). I ask this 'cause opera
    seems to mimic IE, at least in the preferences ?!

    I havent used opera till now, but it seems very buggy piece of software
    !!
    I have one very annoyng problem, fighting already ~4 hours.
    I found that if I use something like this in table (test are
    continuing) :

    <td>
    <form method=post action='action. pl?id=X' ....>
    <input type=submit ...>
    </form>
    </td>
    ......similar forms follows..

    the page is not rendered at all..no prob under firefox.
    Anyone to have idea how to solve this too...

  • Martin Honnen

    #2
    Re: detecting opera ? and more..



    raptor wrote:

    [color=blue]
    > how to detect opera..it seems that even opera8 doesnt support
    > xmlhttp fully (.i.e. sendRequestHead er). I ask this 'cause opera
    > seems to mimic IE, at least in the preferences ?![/color]

    window.opera is a way to detect Opera but usually you should try to
    check for a feature you are going to use e.g.
    var httpRequest;
    if (typeof XMLHttpRequest ! = 'undefined') {
    httpRequest = new XMLHttpRequest( );
    }
    else if (typeof ActiveXObject != 'undefined') {
    httpRequest = new ActiveXObject(' Microsoft.XMLHT TP');
    }
    if (http) {
    httpRequest.ope n(...);
    if (httpRequest.se tRequestHeader != 'undefined') {
    httpRequest.set RequestHeader(' header-name', 'header value');
    }
    ...
    }



    --

    Martin Honnen
    http://JavaScript.FAQTs.com/

    Comment

    • Richard Cornford

      #3
      Re: detecting opera ? and more..

      raptor wrote:[color=blue]
      > how to detect opera..[/color]

      You don't. It is counter productive to ever be interested in the type or
      version of a web browsers, because it is impossible to accurately
      determine that information.
      [color=blue]
      > it seems that even opera8 doesnt support
      > xmlhttp fully (.i.e. sendRequestHead er).[/color]

      Would that be - setRequestHeade rs -? If you want to know whether an xml
      http request object has a - setRequestheade rs - method you test the
      object to see if it has that method. Such a test is 100% discriminating
      and requires no interest in the type or version of the browsers. And it
      will still be 100% discriminating on future versions of Opera 8, which
      may add support for that method.
      [color=blue]
      > I ask this 'cause opera
      > seems to mimic IE, at least in the preferences ?![/color]

      If you mean the User Agent http header, and the correspo0onding -
      navigator.userA gent - string, then yes, spoofing other browsers in UA
      headers/strings is common, normal and permissible (by HTTP
      specification). Microsoft started the practice, so nobody has a right to
      complain that IE browsers are now the main target of spoofing.
      [color=blue]
      > I havent used opera till now, but it seems very buggy
      > piece of software !![/color]

      In my experience it is a lot more stable than IE 6. And not implementing
      methods on non-standardised objects is allowed, if regrettable.
      [color=blue]
      > I have one very annoyng problem, fighting already ~4 hours.
      > I found that if I use something like this in table (test are
      > continuing) :
      >
      > <td>
      > <form method=post action='action. pl?id=X' ....>
      > <input type=submit ...>
      > </form>
      > </td>
      > .....similar forms follows..
      >
      > the page is not rendered at all..no prob under firefox.
      > Anyone to have idea how to solve this too...[/color]

      That mark-up, in isolation, is not a problem for Opera 8 (unless taken
      literally, where the sequences of dots are distinctly unexpected). You
      won't solve problems on Usenet by keeping the problematic code to
      yourself, though an HTML group would be more appropriate for mark-up
      problems anyway.

      Richard.


      Comment

      • Hallvord R. M. Steen

        #4
        Re: detecting opera ? and more..

        > how to detect opera..it seems that even opera8 doesnt support[color=blue]
        > xmlhttp fully (.i.e. sendRequestHead er). I ask this 'cause opera
        > seems to mimic IE, at least in the preferences ?![/color]

        I second the recommendations you've seen about detecting the support for
        setRequestHeade r rather than detecting a specific browser name and/or
        version. Much simpler, and virtually bullet-proof.
        [color=blue]
        > I found that if I use something like this in table (test are
        > continuing) :
        >
        > <td>
        > <form method=post action='action. pl?id=X' ....>
        > <input type=submit ...>
        > </form>
        > </td>
        > .....similar forms follows..
        >
        > the page is not rendered at all..[/color]

        Sample URL for this problem?
        Since this is a markup question and off-topic for the group feel free to
        follow up by E-mail.
        --
        Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

        Comment

        Working...