cross-browser

What Options Are There for Cross-Browser Compatible Audio?

若如初见. 提交于 2019-12-04 12:13:36
问题 I'm using this function: function playSound(file) { MyAudio = new Audio(file); MyAudio.play(); } Unfortunately, I'm struggling to find a file type which will work in all browsers. Mp3 works in Chrome, Safari, IE but not FF and Opera, while .ogg files only seem to work in FF. Any suggestions as to a way around this? I presume there is no way of programmatically detecting which browser is being used and then playing the appropriate file type? Any advise/ideas appreciated. Thanks. 回答1:

Highlight and Edit XML in a browser

扶醉桌前 提交于 2019-12-04 10:05:41
Trying to provide a user with editable XML page in a browser. For example, the following is part of an XML. <Employee name="John Doe" type="contract" ID="1000"> <Salary>10000</Salary> <Email>johndoe@johndoe.com</Email> </Employee> When the above is presented to the user in a brower (either IE or FF), the user should be able to highlight an attribute or the value. When highlighted and the second mouse button is pressed, this would pop up a menu for editing. For attributes and tags, it could be something like ID-TEST-PRESENT or ID-TEST-OPTIONAL. Now instead of ID, the attribute should change to

Do browsers support autocomplete for ajax loaded login forms at all?

谁说我不能喝 提交于 2019-12-04 10:03:26
问题 My problem is, that the browsers' (IE&FF) autocomplete does not work for my login form. I have a webapp with CakePHP & jQuery. To allow visitors to login/register unobtrusively. The login form is inside a div, which is loaded via AJAX. (This enables logging in without a page reload.) The browsers do recognize it as a login field, as they prompt me to save the credentials when clicking login. And they really do save the username/password, as they appear between the saved ones in the browser

Canvas and HTML5: Supported Browsers?

吃可爱长大的小学妹 提交于 2019-12-04 09:57:13
问题 I am looking at using HTML5 Canvas element for my upcoming project. I want to know what all major browsers (including the versions!, cos i know that the latest builds do support canvas) support the Canvas tag. I don't give a damn about IE. So don't bother reporting IE. :) In this tutorial Drawing shapes - MDC, the quadraticCurveTo section says: quadraticCurveTo(cp1x, cp1y, x, y) // BROKEN in Firefox 1.5 (see work around below) Does that mean that Canvas is supported on Firefox 1.5 and above

jQuery “visible” doesn't work in all browsers, but in Firefox

 ̄綄美尐妖づ 提交于 2019-12-04 09:53:30
I've made a very simple fiddle here , and you can check it out in different browsers. It only works in Firefox. In other words, seems that $('#select-tag-id option:visible') doesn't work in other browsers. What's wrong? Is it a jQuery bug? The code is: <select id='items'> <option value='1' style='display: none;'>One</option> <option value='1' style='display: block;'>Two</option> <option value='1' style='display: block;'>Three</option> <option value='1' style='display: none;'>Four</option> </select> and the JavaScript (jQuery code) is: $(function(){ alert($('#items option:visible').length); });

Drop Down List Issue

笑着哭i 提交于 2019-12-04 09:38:50
I’m having an issue where a drop down list in IE 6/7 is behaving as such: You can see that the drop down width is not wide enough to display the whole text without expanding the overall drop down list. However in Firefox, there is no issue as it expands the width accordingly. This is the behaviour we want in IE 6/7: We’ve looked at various ways to utilize the onfocus, onblur, onchange, keyboard and mouse events to attempt to solve the problem but still some issues. I was wondering if anyone has solved this issue in IE 6/7 without using any toolkits/frameworks (YUI, Ext-JS, jQuery, etc…). This

Jagged font on Windows - Chrome & Safari

为君一笑 提交于 2019-12-04 09:21:50
I'm using custom fonts on my webpage using the following code: @font-face { font-family: 'HelveticaNeueBold'; src: url('fonts/HelveticaNeueBold.eot'); src: url('fonts/HelveticaNeueBold.eot?#iefix') format('embedded-opentype'), url('fonts/HelveticaNeueBold.woff') format('woff'), url('fonts/HelveticaNeueBold.ttf') format('truetype'), url('fonts/HelveticaNeueBold.svg#HelveticaNeueBold') format('svg'); font-weight: normal; font-style: normal; } This works fine across all browsers on Mac but looking at it on PC on Chrome and Safari it appears jagged. Are there any fixes I could use to make it all

Opening a file system folder/directory from web browser

淺唱寂寞╮ 提交于 2019-12-04 09:10:44
I distribute my desktop application on flash drives to thousands of users on Windows, Mac, and Linux. I have a HTML starter page that has links to the documentation, install guide, release notes, etc. which are all on the flash drive. I would love for the user to just install directly from the browser, but that's exactly what anti-virus programs are trying to prevent (and rightly so). Instead of trying to launch the installer, it's enough to locate the installer and let the user take the last step by themselves. Is it possible to cause the file system manager (Explorer, Finder, etc.) on the

How can I test in IE while developing under Mac OS X?

只愿长相守 提交于 2019-12-04 09:07:23
问题 I've got my web application on Mac OS X and it's ready for IE compatibility testing. I've tried running the server, booting up VMware and pulling up localhost:3000 with no luck. How can I test my web application on IE6-8 and Chrome without deploying it somewhere? 回答1: All you need is the correct IP address that VMWare uses to access your mac, then you can access it like this: http://192.168.1.2:3000 And test it just fine. I would tell you how to find it but I have more experience with

IE9: Script only works in debugger, but not when NOT debugging

纵然是瞬间 提交于 2019-12-04 08:52:19
I have some trouble with Internet Explorer's compatibility. I'm building an online tool with massive usage of HTML5 canvas, CSS3 and JavaScript. The program works fine in all major browsers, except for Internet Explorer. IE9 switched into compatibility mode, so I set <meta http-equiv="x-ua-compatible" content="IE=9"/> to force IE to process the page with IE9 standards. IE does no longer fall into compatibility mode, but the script does still not work properly. Some basic functionality as drawing or dragging objects works, but only "half". What does a programmer do in this case: He starts the