473,543 Members | 2,062 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 1847


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
14172
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
4097
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') !=...
2
18290
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,...
2
7960
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
1763
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...
13
1779
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....
79
3711
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...
3
6239
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...
2
2315
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...
0
7412
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...
1
7356
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7697
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5889
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...
1
5285
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...
0
3394
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...
0
3394
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1830
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
979
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.