HTML5

Best way to extend a container in full screen

I have read a lot and saw many eaxample about how developers use this thenique to full screen a container and the most used are: .container { position: absolute; top: 0; right: 0; bottom: 0; left: 0; } vs html, body{ height: 100%; margin: 0; } .container { min-height: 100%; margin: 0; } This are the most used methods to…
Read more

HTML 5 Drag and Drop (FileEntry)

I am trying to implement drag and drop using folders in HTML5 and I found an issue with converting the FileEntry to an actual file object as used in the single file handler. e.originalEvent.dataTransfer.items[i].webkitGetAsEntry(); if (entry.isFile) { var files = e.originalEvent.dataTransfer.files; //We need to send dropped files to Server handleFileUpload(files); } else if (entry.isDirectory) { readFileTree(entry); } } handleFileUpload uses:…
Read more

svg rendering complete event [duplicate]

This question already has an answer here: How can I tell when an SVG is finished rendering 1 answer I’m trying to catch event when svg image in tag is rendered. Load event is fired when svg is loaded from storage but rendering takes another ~10s and I want to catch this with some event, is there something like this?…
Read more

Simulate an Excel worksheet on HTML page

I am working on a page where visitors need to copy-paste hundreds of rows from an Excel spreadsheet on to the page. The easier way to do it is to display a text area and parse the different columns. But is there a way to display something like a spreadsheet? That will be more user friendly. I tried CKEditor for…
Read more

IE not loading properly only the first time

I have an application that works perfectly in Chrome,Firefox and Safari, but when I load it on IE happens a strange thing: all the page is loaded on the left side and after one or two refresh it loads properly. Here are two descriptive images: And the second time (after one or more refresh) IE loads it like this: Does…
Read more

Rotate Existing Image on Canvas

I’m attempting to rotate an image that has already been drawn on a HTML canvas, like so: var canvas = document.getElementById(“editorCanvas”); var ctx = canvas.getContext(“2d”); var canvasOffset = $(“#editorCanvas”).offset(); var offsetX = canvasOffset.left; var offsetY = canvasOffset.top; var startX; var startY; var isDown = false; var pi2 = Math.PI * 2; var resizerRadius = 4; var rr = resizerRadius *…
Read more

MediaSource refuses to play additional segments

I’m trying to build a simple video player base on MediaSource. I’ve got it working playing the first segment. However, as soon as I append the next segment playback stops. Any ideas what I might be doing wrong? I’m not getting any errors anywhere. Here is the javascript: /* eslint-disable */ var videoElement = document.querySelector(‘video’) var mediaSource = new window.MediaSource()…
Read more

Google Maps Api: text directions issue

I got this code that dispaly text direction of a route from a position to another (the start position is an Ip geolocation): var lat; var lon; var coords; var directionsDisplay; var latTrun; var lonTrun; function naviga(a) { initialize(); navigator.geolocation.getCurrentPosition(function (position) { lat = position.coords.latitude; latTrun = lat.toFixed(3); lon = position.coords.longitude; lonTrun = lon.toFixed(3); coords = new google.maps.LatLng(latTrun, lonTrun); var…
Read more