html5

CSS Browser Detection

I dont understand why the HTML5 website I am working on is different in all browsers. I know it must be CSS, but I dont know what. on Chrome: http://slackmoehrle.com/chrome.png on Safari: http://slackmoehrle.com/safari.png on IE 7: http://slackmoehrle.com/ie7.png on FireFox Mac: http://slackmoehrle.com/firefox.png the style sheet ca...

How can I get an event to fire every time localStorage is updated in Safari 5+?

I have tried to follow the examples on the Safari Developer Site. The documentation suggests adding an event listener like so: window.addEventListener('storage', storage_handler, false); And then setting your handler function like this: function storage_handler(evt) { alert('The modified key was '+evt.key); alert('The origin...

Browser-based visual editor/designer?

Is there an example of a browser-based and preferably open source visual javascript application designer (using contenteditable or canvas or whatever), perhaps with support for embedded controls and so forth (checkboxes, buttons, etc., or ui controls for various javascript frameworks like jquery.ui, dojo, yui,...), OR else support for ve...

HTML5 canvas clear arc method

I found that there's a clearRect method, but can't find any to clear arc. Is there're any way to clear object from canvas (arc), if I also have that instance saved somewhere... ? What method is to clear arc? ...

How to automatically test if offline mode is working in web application

I have mobile web application that has offline capabilities (via HTML5). I'm currently building automatic build & testing for it (ant, JsTestDriver etc.), until I hit a wall. How can I test if the web application has working offline mode? This is specially painful since if tested by hand; iPhone practically needs full reset between test...

How to stop audio played by audio tag of HTML5

Hi All, I am new to HTML5 and I am exploring HTML5 features. There I came across audio tag. I written code with it to play sound files. I am having one problem with this tag. On button click, I want to change the sound file stopping the previous one. I searched a lot but didn't find anything. Please help me to stop the sound played by a...

Paint on Canvas in Android's browser, page scroll?

I'm trying to make a canvas where the client can sign his name. It works well in Chrome v6: but on Android 1.5 instead of drawing the browser scrolls the page and draws nothing: I borrows the code from Opera's website. Can I disable the scrolling or how can I make this work? Thank you! EDIT using the events touchstart, touchmove ...

Does html5 gelocation method position.address.city only work in Firefox

Does the city method only work in Firefox? for example if I wanted to print the city of the user: if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(location) { document.write(location.address.city); }); } If this is true, what's the best way to find a users city? Take the lat and long a...

Caching a large number of images in a jQuery/HTML5 application

I am building a web application in jQuery/HTML5 which will run in Webkit-based browsers on touchscreen kiosks. There are a large (thousands) number of images which the application uses, which I need cached to each browser. At first I thought a HTML5 cache manifest would be the best option (with the thousands of image URLs listed), but ...

HTML5 and vertical-align? Fixed now?

I come from the world, and have been looking at resources on google about doing multiple wrappers to vertically align content -- however it seems like it's really ugly. Is there an easier way now with HTML5? Is there some sort of implementation that uses something like the HBox/VBox mentality? I saw there are examples for non-ie brow...

HTML5 - canva createLinearGradient vertical

Hi, How can I create a canvas gradient that goes from left to right as opposed to top to down? var lingrad = ctx.createLinearGradient(0,0,0,150); lingrad.addColorStop(0, '#00ABEB'); lingrad.addColorStop(0.5, '#fff'); lingrad.addColorStop(0.5, '#66CC00'); lingrad.addColorStop(1, '#fff'); ctx.fillStyle = lingrad; ctx.fillRect(10,10...

CSS troubles in FireFox and IE and I dont understand why.

I am creating a new site as a learning experience and I am having CSS troubles. In Safari and Chrome it looks good. In FireFox, the style is off and I dont understand why. in IE, it is horrible and most of my style is not working. The site is: http://6colors.co. I posted yesterday and someone recommended an CSS reset at the top of ...

Finding points on curves in HTML 5 2d Canvas context.

Given lines drawn by 2d canvas context functions bezierCurveTo, quadraticCurveTo or arcTo, how can I find points along those lines? My intent is to draw an object at the midpoint of a curve. Using the SVG DOM, I can do this with methods getPointAtLength & getTotalLength, but I can't see an equivalent in HTML canvas. ...

How to check for html5 video support?

Is there any JavaScript or any other way of checking for html5 video support? ...

Show video via flash. If failed, show it via html5.

Would you please suggest how I embed a html5 video player only if there's flash in the browser? If there is flash in the browser I want to use it instead. ...

javascript-canvas Uncaught Error: INDEX_SIZE_ERR: DOM Exception 1

OK, I have two versions of my code. The first appears to work (mostly) and the 2nd gives me the Uncaught Error in the topic name. defs: var VID_WID = 640; var VID_HIGH = 360; var OUT_WID = 480; var OUT_HIGH = 320; var NUM_WID = 3; var NUM_HIGH = 3; var TILE_WIDTH = VID_WID / NUM_WID; var TILE_HEIGHT = VID_HIGH / NUM_HIGH; var OUT_WI...

How to check if the browser can play mp4 via html5 video tag?

How to check if the browser can play mp4 via html5 video tag? ...

Need help about choosing the right way to support multiple players to play videos.

I will try to be brief here.... I am working on a project where i need to support multiple players and platforms to play videos. Major Platforms will be: Windows PC,Mac PC,Apple Devices and Android. This is the precedence i will be following. First it will check browser support for Silverlight 3 or later then Flash then HTML5. If not ...

Difference between html4 and html5 tag doctype tag?

Difference between html4 and html5 tag doctype tag? ...

Multiple columns, column-span workaround

hey there... i'm working with safari and i need to have a multiple columns text (in a single <p> through webkit-column-count), but also i need to make an image span upon two or more columns (i know it's not supported yet, but i'm asking for some workaround if possible) meaning: i want this layout --------------------------- image ---...