cross-browser

ASP.NET Web Parts: Drag and Drop Support in Non-IE Browsers

半世苍凉 提交于 2019-12-17 20:39:50
问题 I have been using web parts on my site since ASP.NET 2.0 came out. Dragging and dropping web parts works great in Internet Explorer, but it doesn't work at all in Firefox, Chrome, or Safari. I recently upgraded the site to ASP.NET 3.5 SP1, but I am still unable to drag and drop web parts in non-IE browsers. How can I enable drag and drop web parts in these other browsers? Update (2/9/2010): This mentions this problem, but offers no solution: http://forums.asp.net/t/1294857.aspx Update (2/19

CSS background-image issue for <select> & <option>

白昼怎懂夜的黑 提交于 2019-12-17 20:26:42
问题 HTML <select data-val="true" id="GameID" > <option value="">Select Game...</option> <option value="4">Counter Strike Source</option> <option value="5">Medal Of Honor</option> <option value="6">NFS Shift</option> </select> CSS select { color: #fff; background: url(/img/backgrounds/tab-hover-background.png) rgba(0,0,0,0); border: 1px solid #8093BE; width: 242px; height: 20px; } option { background: url(/img/backgrounds/tab-hover-background.png) rgba(0,0,0,0); } In Firefox it works fine, In

Cross-browser Issue: Min-height and collapsing margins

家住魔仙堡 提交于 2019-12-17 19:53:38
问题 As you can see in this simple example: <div id="minheight"> <p id="margin">Paragraph with a margin</p> </div> <div id="sibling">Sibling div</div> #minheight { min-height: 100px; background: red; } #sibling { background: blue; } http://jsfiddle.net/peterbriers/B43th There is a difference between Chrome (35) and Firefox (29) in how it handles the collapsing margins on a block with a min-height that is larger than the child's margin . I tried to fully understand the specifications: http://www.w3

How to read clipboard data in cross browser? [duplicate]

こ雲淡風輕ζ 提交于 2019-12-17 19:38:29
问题 This question already has answers here : Closed 8 years ago . Possible Duplicates: Copy / Put text on the clipboard with FireFox, Safari and Chrome How to Copy to Clipboard in JavaScript? Hi , scenario: I copied some content (either from notepad or word) and want to paste it in my iframe. On before pasting i want to manipulate the clipboard content. In IE i can do it with window.clipboardData.getData("Text"); How to read the clipboard data in other browsers (FF/chrome and safari) 回答1: You'll

How do I insert some text where the cursor is? [duplicate]

南楼画角 提交于 2019-12-17 19:37:07
问题 This question already has answers here : Inserting a text where cursor is using Javascript/jquery (12 answers) Closed 4 years ago . I'm upgrading some Javascript which works on IE. However, I'm having some problems. Heres the IE code: var range = document.getElementById('text').contentWindow.window .document.getElementById('Content').createTextRange(); var textObj = document.getElementById('text').contentWindow.window .document.getElementById('Content'); var textFieldValue = theSmile; if

Determine Maximum Possible DIV Height

假如想象 提交于 2019-12-17 18:45:37
问题 Is there a recommended way to determine the maximum height that a DIV can be set and remain visible per browser? This doesn't appear to be documented anywhere and is highly implementation specific. For example, see the following test script: http://jsfiddle.net/NP5Pa/2/ This is a simple test to find the maximum value you can set a DIV style height attribute before the corresponding clientHeight of the element becomes 0. You can confirm this by clicking "Find Max" then incrementing the found

Which web browsers natively support Array.forEach()

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-17 18:45:08
问题 Which browsers other than Firefox support Array.forEach()? Mozilla say it's an extension to the standard and I realise it's trivial to add to the array prototype, I'm just wondering what other browsers support it? 回答1: The JavaScript article of Wikipedia lists the JS versions by browser. forEach is part of JavaScript 1.6. So it is supported indeed by most browsers, except Opera 9.02 (which I just tested). Opera 9.5 (which I just installed!) supports it, along with indexOf for Array.

Setting the caret position to an empty node inside a contentEditable element

匆匆过客 提交于 2019-12-17 18:29:01
问题 My task is to set a text caret to appear inside an empty span node within a contentEditable div. The following gives me no problems on Firefox 3.6: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script type="text/javascript" src="js/jquery-1.4.3.min.js"> </script> <style> #multiple { border: 1px solid #ccc; width: 800px; min-height: 20px; padding: 5px; outline: none; } </style> <script> $(document).ready(function(){ var contentEditable =

attachEvent versus addEventListener

一世执手 提交于 2019-12-17 18:07:24
问题 I'm having troubles getting the attachEvent to work. In all browsers that support the addEventListener handler the code below works like a charm, but in IE is a complete disaster. They have their own (incomplete) variation of it called attachEvent. Now here's the deal. How do I get the attachEvent to work in the same way addEventListener does? Here's the code: function aFunction(idname) { document.writeln('<iframe id="'+idname+'"></iframe>'); var Editor = document.getElementById(idname)

Detect if console/devtools is open in all browsers

半腔热情 提交于 2019-12-17 17:54:08
问题 I'm trying to create a script which will run when any browser console is opened or closed. Is there any way to detect if the browser console in all browsers (Firefox/IE/Chrome/Safari/Opera) is open or not via JavaScript, jQuery, or any other client-side script? 回答1: If you are willing to accept an interference for the user, you could use the debugger statement, as it is available in all major browsers. Side note: If the users of your app are interested in console usage, they're probably