473,387 Members | 1,365 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

detecting opera ? and more..

hi,

how to detect opera..it seems that even opera8 doesnt support
xmlhttp fully (.i.e. sendRequestHeader). 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 1840


raptor wrote:

how to detect opera..it seems that even opera8 doesnt support
xmlhttp fully (.i.e. sendRequestHeader). 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.XMLHTTP');
}
if (http) {
httpRequest.open(...);
if (httpRequest.setRequestHeader != 'undefined') {
httpRequest.setRequestHeader('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. sendRequestHeader).
Would that be - setRequestHeaders -? If you want to know whether an xml
http request object has a - setRequestheaders - 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.userAgent - 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. sendRequestHeader). 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
setRequestHeader 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
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...
10
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...
2
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...
2
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
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....
13
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. ...
79
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...
3
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"...
2
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
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,...
0
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...

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.