cross-browser

Cross browser rounded corners (no image)

亡梦爱人 提交于 2019-12-18 13:03:00
问题 When converting PSD's into HTML or even HTML5 and CSS, how much more difficult is it to round the corners and make those corners consistent across all browsers, especially Internet Explorer? Assuming the corners were rounded with code, not images. 回答1: You can check out Corner if you want a JavaScript solution. It's cross platform. 回答2: You already accepted but CSS3 PIE you can just use the border-radius property (along with gradients, shadows, and other fun CSS3 features) in IE3. I think it

How to prevent default handling of touch events?

我的未来我决定 提交于 2019-12-18 12:56:06
问题 I am trying to do something similar to what embedded Google maps do. My component should ignore single touch (allowing user to scroll page) and pinch outside of itself (allowing user to zoom page), but should react to double touch (allowing user to navigate inside the component) and disallow any default action in this case. How do I prevent default handling of touch events, but only in the case when user is interacting with my component with two fingers? What I have tried: I tried capturing

Post formdata via XMLHttpRequest object in JS ? ( cross browser)

[亡魂溺海] 提交于 2019-12-18 12:38:48
问题 Im trying to post a form data in js : I have this code : var formData = new FormData(); formData.append("username", "Groucho"); formData.append("accountnum", 123456); formData.append("afile", "2"); var xhr = new XMLHttpRequest(); xhr.open("POST", "http://xxxxx/xx.ashx",true); xhr.send(formData); Formdata according MDN is not available in IE ( or unknown). When I try this in FF : ( i think its fine...). when I try in IE : What is the solution to post form data ( or my data but in objective way

.click() method, browser support

谁说胖子不能爱 提交于 2019-12-18 12:29:40
问题 I'd like to use the js method .click() as follows: document.getElementById(id).click(); But since it is essential that it works, I was wondering of what browsers support the .click() method has. 回答1: The only browser I have encountered that does not support .click() is Safari. Safari supports .click() on buttons (e.g. <input type="button" /> ) but not on other elements such as anchor elements (e.g. <a href="#">Click Me</a> ). For Safari, you have to use a workaround: function click_by_id(your

CSS (perhaps with Compass): Cross-browser gradient

拟墨画扇 提交于 2019-12-18 11:53:39
问题 I would like to get a gradient in CSS (perhaps through Compass) that works in every major browser, including IE7+. Is there an easy way to do this (without writing a lot of code, and without a custom image file)? I looked at Compass's gradient mixin, but it does not work with Internet Explorer. Any ideas? (It does not need to be Compass -- I am happy install something else.) Edit: What I am trying to get is some framework (like Compass?) that generates code like what Blowsie posted that's

Show a moving marker on the map

混江龙づ霸主 提交于 2019-12-18 11:42:57
问题 I am trying to make a marker move( not disappear and appear again ) on the map as a vehicle moves on the road. I have two values of latLng and I want to move the marker between the two till the next point is sent by the vehicle. And then repeat the process again. What I tried:[This is not a very efficient way, I know] My thought was to implement the above using the technique in points below: 1) Draw a line between the two. 2) Get the latLng of each point on 1/10th fraction of the polyline. 3)

javascript:; vs javascript:void(0);

こ雲淡風輕ζ 提交于 2019-12-18 11:04:27
问题 I would like to know what is the difference between javascript:; and javascript:void(0); if I use them in href attribure for a anchor (link) <a href="javascript:;" onclick="DoSomething();">Link</a> <a href="javascript:void(0);" onclick="DoSomething();">Link</a> I see them acting the same on all browsers but what is the technical difference? Regards, Magdy 回答1: One runs JavaScript that has no statements, the other runs JavaScript that evaluates the statement 0 and then returns undefined .

How do I associate a custom MIME-type to my local application in the major browsers?

送分小仙女□ 提交于 2019-12-18 11:02:57
问题 I want to invent a new mime-type and associate it to a custom application in the browser to enable users to launch my app from a web page. The users of my secure web site are in a closed-environment, meaning this is not a general-purpose, mainstream application - I can configure their browser ahead of time. Spoon.net does something very similar to enable launching virtualized applications using their mini-kernel plugin. One of the answers to this question alluded to this method, without

How do I associate a custom MIME-type to my local application in the major browsers?

瘦欲@ 提交于 2019-12-18 11:02:35
问题 I want to invent a new mime-type and associate it to a custom application in the browser to enable users to launch my app from a web page. The users of my secure web site are in a closed-environment, meaning this is not a general-purpose, mainstream application - I can configure their browser ahead of time. Spoon.net does something very similar to enable launching virtualized applications using their mini-kernel plugin. One of the answers to this question alluded to this method, without

Facebook app works on all browsers but not IE8

霸气de小男生 提交于 2019-12-18 10:58:11
问题 I am devloping a facebook app. Stragnly, the app work fine on most browsers (I tested it on FF, chrome and safari and it worked fine on all of them). However when I tested on IE8, I received this error message when trying to make an ajax call to one of the pages: Fatal error: Uncaught Exception: 102: Requires user session thrown in /home1/website/public_html/facebook/src/facebook.php on line 515 This is the function than contain line 515 in facebook.php : protected function _restserver(