cross-browser

Uncaught SyntaxError: Failed to execute 'postMessage' on 'Window': Invalid target origin 'my_page' in a call to 'postMessage'

别来无恙 提交于 2019-12-03 10:20:46
i have following script Parent Page(pair_pixel_filter.php): window.addEventListener("message", function(e) { $('#log').append("Received message: " + (e.data)); }, false); $('.photo-upload-btn').click(function(event) { event.preventDefault(); window.open($(this).attr("href"), "popupWindow", "width=600,height=600,scrollbars=yes"); }); The Child Page $.ajax({ type: 'post', url: url, data: { base64data: dataURL }, success: function(data) { window.opener.postMessage(data, "pair_pixel_filter.php"); window.close(); } }); Basically opening a Popup and then doing some ajax on pop up and returning

How can I make multi-line, vertically and horizontally aligned labels for radio buttons in HTML Forms with CSS?

这一生的挚爱 提交于 2019-12-03 10:20:42
问题 Assuming the following markup: <fieldset> <legend>Radio Buttons</legend> <ol> <li> <input type="radio" id="x"> <label for="x"><!-- Insert multi-line markup here --></label> </li> <li> <input type="radio" id="x"> <label for="x"><!-- Insert multi-line markup here --></label> </li> </ol> </fieldset> How do I style radio button labels so that they look like the following in most browsers (IE6+, FF, Safari, Chrome: 回答1: I believe this does it all. You didn't mention that it has to validate,

Is there a HTML character that is blank (including no whitespace) on all browsers?

此生再无相见时 提交于 2019-12-03 10:09:45
Is there a HTML character that, on all (major) browsers (plus IE8 sadly) displays nothing and doesn't add any extra space? So, an alternative to   but which doesn't add whitespace to the page, and which won't ever show up as an ugly "unrecognised character" marker or ? . Why: in my case, I'm trying to work around a problem on an old, proprietary CMS that is removing empty but necessary HTML elements that are required because other parts of the system will fill them dynamically. Imagine something like (simplified trivial example) <span class="placeholder" data-type="username"></span> which is

window.devicePixelRatio browser support

自闭症网瘾萝莉.ら 提交于 2019-12-03 10:08:22
I have been looking around the web to find what browser support there is for window.devicePixelRatio , without much luck. Does anyone know what browers/devices support this? According to this blog post : ( from 2012 ) window.devicePixelRatio is mostly trustworthy on most browsers. On iOS devices, multiply devicePixelRatio by screen.width to get the physical pixel count. On Android and Windows Phone devices, divide screen.width by devicePixelRatio to get the dips count. 2017 UPDATE: This property returns the ratio of the resolution in physical pixels to the resolution in CSS pixels for the

Skip links not working in Chrome

你。 提交于 2019-12-03 09:55:43
问题 First of all, I've looked at this previous question but sadly it didn't seem to offer any solutions (other than JS which is a non-starter I'm afraid) I've got some skip links at the top of my page... <ul> <li class="skip-link"><a href="#mainContent" accesskey="S"><span>Skip to main content</span></a></li> <li class="skip-link"><a href="#main-navigation" accesskey="N"><span>Skip to main navigation</span></a></li> </ul> and further down there is... <div id="mainContent"></div> which is an empty

remove borders around html input

…衆ロ難τιáo~ 提交于 2019-12-03 09:43:48
I want to create a search function for my web app. here are the looks on FF & IE, it is ok without strange border Firefox IE and here are the look on Chrome & Safari, it has strange border around the input element Chrome Safari Here is my html & css code <input type="search" id="generic_search" onkeypress="return runScript(event)" /> <input type="button" id="generic_search_button" /> the border:0 has been applied to all elements #generic_search { font-size: 14px; width: 250px; height: 25px; float: left; padding-left: 5px; padding-right: 5px; margin-top: 7px; } #generic_search_button { float:

copy to clipboard - not working in FF,Chrome

对着背影说爱祢 提交于 2019-12-03 09:29:02
问题 I am using below mentioned javascript to copy the text to clipboard. Its working in IE, but not working in Firefox and Chrome. Please advice me,What is wrong? function setDataToclipboard() { var str=document.getElementById("populatedString").value; if (window.clipboardData && clipboardData.setData) { clipboardData.setData("Text", str); alert("Copied!"); } } 回答1: w3c clipboard api is been implemented by all the browser http://caniuse.com/#feat=clipboard 回答2: The clipboard manipulation is not

How can I test my webpage using different browsers?

旧巷老猫 提交于 2019-12-03 08:53:01
I just found out about the Yahoo UI Reset CSS tool/file and I'm using it on my website. On my machine I have Internet Explorer 7 and Firefox 3.01 and my webpage looks the same on these two browsers. A friend is using Internet Explorer 6 and the page is completely a mess. I have two questions: Am I that poor/stupid in writing CSS? How can I test my webpage using different browsers on my machine? If you are not particular about testing in your machine, you could try http://browsershots.org . It's free and provides screenshots of your site in various browsers on Linux/Windows/Mac OS/BSD. cowgod

HTML5 video: ffmpeg-encoded MP4 not playing in any browser (plays in VLC though)

删除回忆录丶 提交于 2019-12-03 08:32:17
I am trying to serve HTML5 video in MP4 and WEBM fomats. I cannot get all browsers to work though: Browsers which support WEBM (Chrome desktop, Firefox desktop) play the videos fine. Browsers which use MP4 are not working (IE, Safari, Android). WEBM is being served as video/webm . MP4 is being served as video/mp4 . Minimal JSFiddle at: http://jsfiddle.net/#&togetherjs=5Ql5MmrV4j Browser errors: IE11: 11.0.9600.17126 / 11.0.9 KB2957689 Error: Unsupported video type of invalid file path Android browser and Chrome Android: No error, video just refuses to start Sanity test - the following three

d3.js visualization on android 2.3

情到浓时终转凉″ 提交于 2019-12-03 07:58:43
I know that the android browser for 2.3 does not support SVG, but I'd like to know whether I could convert a d3.js SVG Visualization to a canvas using Canvg on clientside. Is the browser able to parse SVG elements at all, or would this transformation from SVG to Canvas need to happen server side? Thanks in advance! // Grab data from server... var btoken = window.location.search.split( 'bearer_token=')[1].split('&')[0]; var endpoint = "http://dcaps-staging.media.mit.edu:8080/api/reality_analysis_service/get_reality_analysis_data?document_key=radialData&bearer_token=" + btoken; console.log