473,699 Members | 2,197 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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...

Jul 23 '05 #1
3 1853


raptor wrote:

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 ?!


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/
Jul 23 '05 #2
raptor wrote:
how to detect opera..
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.
it seems that even opera8 doesnt support
xmlhttp fully (.i.e. sendRequestHead er).
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.
I ask this 'cause opera
seems to mimic IE, at least in the preferences ?!
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.
I havent used opera till now, but it seems very buggy
piece of software !!
In my experience it is a lot more stable than IE 6. And not implementing
methods on non-standardised objects is allowed, if regrettable.
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...


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.
Jul 23 '05 #3
> 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 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.
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..


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/
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
14201
by: Daniel Orner | last post by:
Does anyone know of a simple way to have a Python script find out what browser is accessing it? After a web search the only thing I found to do this is Zope, but the system I'm programming doesn't use Zope and I'm not really interested in installing it just for this minor detail. Is there another way? Thanks! --Daniel Orner
10
4116
by: Frances Del Rio | last post by:
pls, why is this not working? <SCRIPT language=JavaScript type="text/javascript"> var br = '<SCRIPT language=Javascript' br += 'src="js_pop.js" type="text/javascript">' br += '</SCRIPT>' var op = '<SCRIPT language=Javascript' op += 'src="js_pop-op.js" type="text/javascript">' op += '</SCRIPT>' if (navigator.userAgent.indexOf('Opera') != -1 ) {
2
18342
by: Halldór Ísak Gylfason | last post by:
In my application I have an iframe that is empty (and not visible) initially, however when a user presses a button a form is programmatically submitted and the target is set to the IFrame. I want to detect when the frame has been loaded with the result of the form submit. Of course I have tried some event handlers like onload, onactivate, onreadystatechange, but they do not work in this example. They only seem to work, when the "SRC"...
2
7971
by: Sharon | last post by:
Can I use request.servervariables("HTTP_USER_AGENT") to determine if the user has Firefox or Internet Explorer? Is the return string differentiated enough? Thanks for any input.
3
1771
by: Csaba Gabor | last post by:
If I detect an empty textbox, I fill it with a value ('Dad'). If I do this twice, the second time around IE 6 fails to notice that I've cleared the textbox again, thus leaving the textbox cleared. Is there a recommended workaround? Opera 7.23 is detecting the second deletion fine. Thanks, Csaba Gabor The page snippet below illustrates what I mean:
13
1794
by: ima | last post by:
I've been studying a great book on css and now that I've put together a few pages using it, I'm finding out that my book needed one more very important chapter. Introducing css in the real world. Obviously, there are a LOT of older browsers still out there that don't support css and some newer one's that still don't support it very well. Knowing that, I have prepared a second set of pages using table layouts for those browsers. It...
79
3765
by: VK | last post by:
I wandering about the common proctice of some UA's producers to spoof the UA string to pretend to be another browser (most often IE). Shouldn't it be considered as a trademark violation of the relevant name owner? If I make a whisky and call it "Jack Daniels", I most probably will have some serious legal problems. "Mozilla" partially appeared because NCSA stopped them from using "Mosaic" in the UA string. Is it some different...
3
6242
by: whapts3 | last post by:
I'm putting together a rather dynamic page (AJAX/all-that-mess). So... to go between different sorts of content on the page, I have it set up something like this. <a href="#10" onclick="loadFragment()"> ... </a> <a href="#20" onclick="loadFragment()"> ... </a> where loadFragment is a function which does something based on the #20 which is now appended to the document's .location.
2
2324
by: petermichaux | last post by:
Hi, I don't know if there is a way to feature detect for this or not. I have a list and the user can click on items to select. I would like that they can command-click on Mac or control-click on other OS to multiple select. This matches normal file system behavior. I found this example which doesn't seem to work in Opera on Mac: the mac variable will be false.
0
8706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8631
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9199
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9055
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7787
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6550
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4392
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2366
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2016
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.