cross-browser

Is there a browser compatiblity issue with relative image paths in .css files?

只谈情不闲聊 提交于 2020-01-07 02:13:05
问题 I have .css files with relative references to images like this: BODY { BACKGROUND: url(bg.gif); } where the bg.gif file is located in the same folder as the .css file. This seems to work fine in my testing but I notice some errors in my logs that indicate that some browsers are trying to find bg.gif in the same folder as the .html page that refers to the .css file, not the folder where the .css file is. Here's an example of one such HTTP_USER_AGENT : Mozilla/5.0 (Windows NT 6.1; WOW64)

AS2(!) : best crossbrowser way of calling javascript functions?

家住魔仙堡 提交于 2020-01-06 20:24:44
问题 I have a AS2 project here that makes some troubles on certain browsers. Can someone tell me, what's the most crossbrowser compatible way to call javascript functions out of a AS2 project (compiled for Flashplayer 8)? GetURL or ExternalInterface.call? What to pay attention to? Sorry if the question is somewhat ambiguous, but i don't want to track a specific bug, just to find another one appearing with some other browser then. thanks! 回答1: I've used both without any issues in a wide range of

using xpaths in javascript

放肆的年华 提交于 2020-01-06 19:50:33
问题 I have a large set of XPaths for selecting content in webpages and I want users to be able to use them in the browser (including IE). What do you recommend? Try and interpret the XPaths with JavaScript? Or perhaps convert to regex? Some existing JavaScript XPath work: http://js-xpath.sourceforge.net/xpath-example.html http://goog-ajaxslt.sourceforge.net 回答1: I would look for an XSLT javascript library. Since most modern browsers have built-in XSLT support, and XSLT includes support for XPath,

OnClick Dropdown works in FireFox but not Chrome or IE?

二次信任 提交于 2020-01-06 15:58:52
问题 The following code works perfectly in Firefox, but not in IE or Chrome... Any ideas why? <script type="text/javascript"> function display_div(show){ document.getElementById('passenger1').style.display = "none"; document.getElementById('passenger2').style.display = "none"; document.getElementById('passenger3').style.display = "none"; document.getElementById(show).style.display = "block"; } </script> <select name="#" id="#"> <option selected="selected"> </option> <option onClick="display_div(

Choose title- and file name at runtime

£可爱£侵袭症+ 提交于 2020-01-06 15:07:02
问题 I am trying to automate file upload in two browsers but the window name is "File Upload" in Firefox and "Open" in Chrome. I don't want to write two different scripts. How to choose title- and file name at runtime to achieve cross browser compatibility? I use Selenium and testNG, AutoIt only for file upload. 回答1: Set a variable based off the web browser being used, then use that variable. The code below should get you on the right track. $FirefoxUpload = "File upload" $ChromeUpload = "Open" if

Getting an Error Code: 0 in only IE for javascript file

天涯浪子 提交于 2020-01-06 14:45:23
问题 Im using a Drupal 7.22 installation for my website. I keep getting an error in IE for one of my JS files. The error in IE states Line: 32 Error: Not implemented This issue only occurs in IE 9 and older and only in Internet Explorer. Chrome, FireFox, ect work without any problem. 回答1: self is a global variable an alias for window . You cannot change the value of the window variable. You need to use var to make it a local variable: var self = jQuery(this); P.S. You should use var for every

Using .ico file for cursor

荒凉一梦 提交于 2020-01-06 14:21:48
问题 Can I use an .ico in the css cursor property without consequences (i.e full browser compatibility.) or must I use a .cur? As in: cursor: url(img/cursor.ico); 回答1: cur files and ico files are almost identical. The only important difference is that the cur file has a hotspot at the tip of the icon. You should find that both work identically over the web. 来源: https://stackoverflow.com/questions/7219865/using-ico-file-for-cursor

Links disabled in html

做~自己de王妃 提交于 2020-01-06 07:45:14
问题 I've been working on a revamp of the charity site I'm the webmaster for, heroinitiative.org. It is located here: http://www.heroinitiative.org/revamp/default.html (and no it's not live code, it sits alongside the live site just so I can show progress to my boss, it's not really important to keep it under wraps, which is why I can post it here) My problem: For some reason all links in the footer (from id "bodyfooter" on down, including anything I put below the "Partners/Thanks" footer) have

Display data on different browser tabs

早过忘川 提交于 2020-01-06 07:38:59
问题 The browser has two tabs opened with the different URL. The data received by one html page from server... Is it possible to display the same data in another tab which is already opened without reloading...If so how should that has to be done... 回答1: Yes, if either: Your code opened the other tab (via window.open ), or The window has a name (such as one assigned via the target attribute on a link, e.g. target="otherwindow" ) Additionally, the window's content must be on the same origin as the

Display data on different browser tabs

不羁的心 提交于 2020-01-06 07:37:28
问题 The browser has two tabs opened with the different URL. The data received by one html page from server... Is it possible to display the same data in another tab which is already opened without reloading...If so how should that has to be done... 回答1: Yes, if either: Your code opened the other tab (via window.open ), or The window has a name (such as one assigned via the target attribute on a link, e.g. target="otherwindow" ) Additionally, the window's content must be on the same origin as the