cross-browser

Overriding the F1 key in FF, chrome, ie. Is F1 on ie8/chrome on keyup and in FF on keypress? What about <tab> in an input field?

大憨熊 提交于 2020-01-14 14:09:14
问题 I'm creating namespaced events with jquery. When I use the following function with code=112, a function, bool=false, everything works fine in FF and the F1 key submits to my function and the event does not bubble up to open the firefox help in a new tab. function bindKeyFunc(code, func, bool){ $(document).bind('keypress.' + code, function(e){ var c = (e.keyCode ? e.keyCode : e.which); //console.log(c); if ( code == c) { //e.stopPropagation(); //e.preventDefault(); func(); return bool; } }); }

xml counting elements in a list does not work in firefox

浪子不回头ぞ 提交于 2020-01-14 05:58:09
问题 I am writing some CSS to customise the display of an XML document. Basically I want to customise the display of child elements, and render them similar to HTML OL/UL/LI elements. My XML is structured like this: <?xml version="1.0"?> <?xml-stylesheet type="text/css" href="style.css"?> <transcription> <turn> <speaker>Speaker Name</speaker> <clause> text here </clause> <clause> one or more clauses </clause> </turn> </transcription> My CSS looks like this: turn { counter-reset: item; } turn

Why does Firefox rotate an element differently than Chrome/Safari?

我们两清 提交于 2020-01-14 05:30:16
问题 In the jsFiddle below why does Firefox rotate the container differently than Chrome or Safari? http://jsfiddle.net/CRc9d/ Browser Version Info: Firefox 7.0.1 Safari 5.1.1 Chrome 15.0.874.120 In Chrome and Safari the container rotates gradually whereas in Firefox the container rotates immediately. 回答1: I'm not sure if this helps... I replaced -moz-transition-property: rotate; -moz-transition-duration: .17s; -moz-transition-timing-function: linear; with -moz-transition: -moz-transform 0.17s

mysql inserting records twice in database

喜欢而已 提交于 2020-01-14 04:52:28
问题 I have the simple code shown below. After it has run once, it inserts the results into MySQL database twice. It is working fine in all browsers (IE, Chrome, and Safari) except Firefox. I am using symfony php framework and propel as the ORM. $con = Propel::getConnection(); $sql = "select * from tmp where user_id =$userid"; $stmt = $con->prepare($sql); $stmt->execute(); while($row = $stmt->fetch(PDO::FETCH_ASSOC)) { $insert_sql = "INSERT IGNORE into library(xxx,xxx) VALUES('xyz','xys')";

HTML5 Video from a Password Protected directory in Safari

大城市里の小女人 提交于 2020-01-14 04:02:08
问题 Has anyone had a similar problem, and have found a solution? I have a page in a password protected directory that I would like to show video on, using the HTML5 video tag (with video.js, video tag is correct, and all fallback formats are included so no issue there). The problem is that Safari does not seem to play the video files when they are in the same PW protected directory, while all other browsers do. As soon as I move the vid files are out of the PW protected directory it plays fine.

asp.net site mobile phone support

我是研究僧i 提交于 2020-01-13 20:23:17
问题 I need to make my site work well on a blackberry, i haven't put too much effort into getting this working yet, but i have a few questions which google is struggling with. I've read about detecting brower type and modifying the default behaviour of asp.net controls here How would I go about supplying a differant stylesheet to a specific browser, should i just do this? if (Request.Browser.Browser.ToString() == "blackberry") //pseudocode { Response.Write("bb.css"); } else { Response.Write("bb

asp.net site mobile phone support

家住魔仙堡 提交于 2020-01-13 20:22:49
问题 I need to make my site work well on a blackberry, i haven't put too much effort into getting this working yet, but i have a few questions which google is struggling with. I've read about detecting brower type and modifying the default behaviour of asp.net controls here How would I go about supplying a differant stylesheet to a specific browser, should i just do this? if (Request.Browser.Browser.ToString() == "blackberry") //pseudocode { Response.Write("bb.css"); } else { Response.Write("bb

CSS if statements… is it right?

陌路散爱 提交于 2020-01-13 09:32:34
问题 I'm new with the conditional CSS. My question is, is it right to use it for dealing with cross-browsers issues? For example: #header { [if IE 7] width: 600px; [if Webkit] width:300px; } Editor's note: OP is most likely using this: http://www.conditional-css.com/ 回答1: Use conditional statements for the actual CSS files (or classes) but on the html. Like this for example: <!--[if lte IE 6]> <link href="css/layoutIE6.css" rel="stylesheet" type="text/css" /> <![endif]--> This is written on the

SVG <image> tag inlined in HTML not loading image in browser

為{幸葍}努か 提交于 2020-01-12 17:49:36
问题 Trying to load an image in SVG using an HTML page: <html> ... <svg> <image x="330" y="137" width="320" height="38" preserveAspectRatio="none" href="/img/title.png"></image> </svg> ... </html> All other elements in the svg load up (paths shapes text) except image. Any way to get this working in browsers? I've tried Chrome, Firefox, IE. All browsers are missing the image. Using Chrome I found that Chrome doesn't even send the request for the image. I have a hunch it's the same for IE and

Is oncontextmenu cross browser?

拥有回忆 提交于 2020-01-12 14:07:24
问题 window.oncontextmenu = function() { return false; }; Will this work on all major browsers such that the right click will not be initiated? 回答1: See this quirksmode page for a detailed compatibility table. 回答2: QuirksMode has a comprehensive chart of support for the event. You can use it to decide if it meets your needs depending on browsers you support. 来源: https://stackoverflow.com/questions/7223143/is-oncontextmenu-cross-browser