This works fine but it is not very elegant. Another disadvantage is that it is not XHTML compliant.
The other way is using some sniffer scripting like that found in the JavaScript Browser Sniffer (Web Reference).
However, this is not very reliable as it needs to be constantly updated to take newer browsers into consideration. Also, on my system it gave an incorrect Javasctipt version of 1.3 when it should have given 1.5 (according to the first option above).
I was just wondering if there was a more dependable way of doing this.
Maybe it would just be better to avoid unnecessary headaches and restrict myself to W3C compliant brwosers.
I've have got this script, the only thing I want to be changed is the first part. It has to detect IE version 6 instead of just "Microsoft Internet Explorer". Can somebody help me out? I tried "Microsoft Internet Explorer 6" but that doesn't work.
I am fairly new the world of Javascript and need to write a javascript or vbscript to detect the version of realplayer site visitors have installed on their system, return the result, and if necessary redirect the user to a page were the player can be upgraded. Code:
I have some html code i would like to be printed to the page only if the browser has javascript enabled. I have tried to use document.writeln() but the string i want to print bot contains some ' and " in it. I don't know how to set the delimiters of the string that is passed as argument so that i don't get an error in the page.
I noticed that some sites use <script src='fineName.js?ver=XXX'></script(even google) Someone told me that it's for script changes, means - if the file in server has been changed than the new XXX will demand to load the new file. I find it hard to believe that it's true.
I've uploaded a new version of the javascript::Minifier module that was on CPAN. It was a translation of JSMin but I rewrote it so it now handles missing semicolons, + ++ code, and leaves those freaky IE conditional comments in the output. The goal was that if working code is input then working code is output where working == working. Breaking code that works is not such a good idea. Code:
I have a lot of JavaScript code I wrote to add special features and effects to my Web sites. The problem is, with the latest versions of Web browsers, all browser-side scripts are blocked. Most users who visits will either not know how to adjust their security features to allow scripts or will not want to change their settings. In a case where the script is vital to the functioning of the Web page, what is the alternative?
For example, one of my script is for a drop-down menu that takes the user to the selected section from the drop-down menu.
The other feature I need is roll-over that highlight parts of a map so that the user can make a selection.
Is there something I can add to my JavaScript code to prevent browsers from blocking it or is there a different way of using these features with a different script?
I'm going to make an attempt at coding a nice tree menu that is decent with browser support.
I want the tree to be displayed on all browsers (well, within a decent range). Of course, on older browsers, the menu won't be as functional.
Now, I'm going to be combining the javascript with a server-side language (asp.NET) and I'll be able to do some basic browser detection on the server.
But, I read about javascript object detection and am wondering how well that works exactly.
Like, what if a browser that doesn't support objects period tries to run some object detection code? Also, which browsers support user defined objects?
See, I'm thinking of breaking down the script in 3 categories. Browsers that won't get any javascript... these would be the browsers that don't support object detection, browsers with basic javascript... with these I would be able to code my own object and I would test for different features. And then there would be the browsers that can run it all.
So, basically, my question is what browsers support what features and how should I break down my code between them? A long time ago (back in the Netscape 4 / IE4 days) I did some javascripting, but since then I haven't really done any. I remember that NS4 didn't support div tags but supported layers... anyway, it got really messy.
I have problems updating from version 1.7.2. to version 1.8. I'm using a custom theme - can anybody give me a step-by-step guide how to update without destroying the whole site ? :) I would like to have the button featueres in the new version
I am trying to get started using JQuery, but I find I can't even get to lesson #1. When I go to jquery.com and click to download the latest version (or any version) it doesn't "download" anything. It opens the file as a webpage in my browser and I see all the JQuery in one big string. Why won't the file just download? Is it the browser I am using? Is it my Mac?
I have a page with a script that works only in IE and as I heard from feedbacks it doesn't run under IE on Mac.
I have browser type redirect script for that page that seems to be working fine except it doesn't detect the OS ( IE on Mac just gives blank page). Can someone add to the code that I would give me one page for IE on Windows and another one for all others? Code:
I'm using the code below for the "launch page" to open a JS window and know when it has been closed, and than execute some other code that should be run after the pop-up closes.
javascript Code:
This works, and does exactly what I want. Do any of you JS experts see any reason for concern? Anything that makes it suboptimal?
So I need script, which will detect users browser, and if browser will be IE, then show some link in content, if browser is FireFox or Opera, then hide that link. Link looks like:
I would like to have my page display the IP address of the user when the page loads. I have heard of the IP detection scripts when using the "var ip = '<!--#echo var="REMOTE_ADDR"-->" attribute to make a window or alert popup and display the IP of the user, and I have also come some scripts that display the IP in the status bar. However, I want the current IP adress to be shown on the page itself, part of the <Body>.
I currently have a site which uses cookies, the problem is that I want it to detect if the browser being used has cookies enabled. I know you can accomplish this by setting a cookie in JavaScript and testing for it (i don't know how to do it, though), *BUT* I need the script to be compliant with all (or at least most) browsers. By this I mean, Mozilla, Firebird, Opera, IE, Netscape, and anything else you can think of.
We have a database application that runs in a popup Internet Explorer application window. The reason for this is to isolate the casual user from the address bar and the typical IE navigation buttons.
The application has a browser test page that displays an error message when a popup blocker is found and opens a popup page stating the test was successfull if there is no popup blocker.
Is there a reliable method (preferably javascript) for detecting the major popup blockers (SP2, AOL, Yahoo, Google, MSN, etc.)? We currently have a temporary solution in place which works OK but we would like to have a better solution.
We have already reasearched this on the net, as well as spent a few hours trying different options.
The application is designed to run on MSIE only so the solution can be Explorer specific.