html5

HTML and Body are not taking up the entire browser - HTML5 problem?

I have no idea what I'm doing wrong, but for some reason, I'm experiencing a bug with my markup that is causing my body element and my html element to not take up the entire viewport in the browser. I can't get to the bottom of this. It first reared its head when I tried to add a 10px purple border to the top and bottom of my body. If...

HTML5 DataTransfer detection error in Chrome

Trying to detect if files property is supported in DataTransfer Object using Javascript. The following code causes an "Uncaught ReferenceError: DataTransfer is not defined" in Chrome, but IE, Firefox and Safari are all fine. My code is: if ("files" in DataTransfer.prototype) { alert("supported"); } Any idea why or an alternative ...

WebSockets in Python3.1 handshake problem

i am using python3.1 ,so i found a html5 websocket snippet here: http://www.nublue.co.uk/blog/threaded-python-websocket-server-and-javascript-client/ I test with chrome. After send handshake packet,web client has no response as expect(websocket.onopen is not fired).I do receive client's request. .i tried many times.It just not work. ...

How to build an HTML5 game

Hi. I'm tasked with building an educational game for 6 - 10 year-old children using HTML5 for a non-profit organization. I've used HTML5/CSS3/jQuery to build a new site but have no experience building games. This project will have to be completed in about 2 months. A few questions for the experts here: Is this doable in 2 months? Do I...

How does modernizr check support for the new input attributes in webforms2.0?

Well, that's pretty much my whole question. I can see how they check for CSS3-support, trying to fetch style.borderRadius and such to see if the browser knows what the heck is going on. But since most browsers will let the attribute stay (<input type="date">), but still not support it fully, I can't understand how they do their magic. ...

Not sure how to use jQuery noconflict function....

I've been working on this site for the past two weeks and everything has been running smooth until now. I have conflicting javascripts and all though I know what method to use to solve the problem (jquery noconflict), I have no idea how to use it! In my case, I have: a drop menu which uses the prototype js and a custom js and a conta...

HTML5 localStorage design questions

What is the best way to store object data in HTML5's localStorage. I haven't worked much with key value storage. In my research i've seen a few different approaches. example data: var commands = [ {invokes: 'Window', type: 'file', data: '/data/1'}, {invokes: 'Action', type: 'icon', data: '/data/2'}, {invokes: 'Window', type: 'fi...

Android not playing HTML5 video on HTTPS

I am using HTML5 element to play a sample.mp4. It plays fine if using HTTP protocol. If I change the URL to use HTTPS, it will give error "Sorry, this video cannot be played." The SSL certificate is valid. I have tried on both IIS and Apache server. <video src="sample.mp4" id="myvideo" /> <a href="javascript:void(0)" onclick="document....

How to implement sineWaveTo squareWaveTo and sawWaveTo lines in html5 canvas 2d context?

I would like to try an implement these so that they can be used in a manner similar to lineTo(). Starting from the current point, given the ending coordinates the functions would draw either a square, saw, or sine line all the way to the the ending coordinates. I dont know if we can factor in both Amplitude AND Frequency because I guess...

How to play MPEG4 Visual with HTML5 <video>?

I currently use this to play AVC (H.264 or MPEG-4 Part 10) videos. <video controls preload> <source src="xyz.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'> </video> However, that doesn't work for MP4V (MPEG-4 Visual or MPEG-4 Part 2) videos. I tried codecs="mp4v.20.8, mp4a.40.2" but that doesn't seem to work either. Does a...

css3 div 'pulse'

how does one make a div/input flash or 'pulse' say for example a form field has an invalid value entered? ...

Mode7-like perspective transform in canvas?

I'm making a canvas-based game engine and am wondering if anyone has any good info on how to achieve an overhead view perspective. What I'm looking for is somewhere halfway between the traditional birds eye view and the old SNES mode7 view. Just a slight angle to give the illusion of 3D. I'm trying to figure out what is going to be the ...

HTML5 autoscroll using dragNdrop on a scrollable table

I am using the scrollable table in http://www.imaputz.com/cssStuff/bigFourVersion.html. I have added HTML5 drag and drop. Now I am try to autoscroll the table. I have a event listener ondragleave for the tbody. but I do not know the correct event when it drag leaves the tbody. I get many dragleave so it is hard for me to isolate the ti...

Simple webpage that crashes Internet Explorer 8

Hi, I've tried the following HTML code on several different Windows 7 computers with Internet Explorer 8, and everywhere this crashes Internet Explorer. I have not been able to reproduce this with IE7, or on Windows XP with IE8. <!doctype html> <head> <title>Crashes IE8 on Win7</title> <style> article { display: block; } </style> <scr...

HTML5 - Validation messages

What element should I use to show validation messages (errors) to the user? Which one is more semantic in HTML5? ...

LocalStorage Firefox 3.6

According to everything I've read, Firefox 3.5+ supports localStorage. And yet I'm seeing the alert (failing) in Firefox 3.6. Do I have some strange settings in my Firefox? Any ideas? function supports_html5_storage() { try { return 'localStorage' in window && window['localStorage'] !== null; } catch (e) { alert(...

Live Connection from Javscript/html

Is there a way to have a live connection (like for a chat server) with a server using only HTML(5)/JavaScript? ...

Best way of creating graphics-heavy, cross-platform, eBooks?

I have been working on converting graphics and layout heavy books (created in Adobe InDesign) into cross-platform eBooks with non-standard functionality (embedded video, audio, interactivity, etc). Exporting from InDesign to EPUB or other similar formats don't seem to work very well with the types of books I work with. There are all ki...

How do I detect if the browser window is active

The code im currently using is this var focus; function focuswindow() { focus = true; } function hidewindow() { focus = false; } window.onfocus = focuswindow(); window.onblur = hidewindow(); The idea is that it can be used like this if( focus ) { //do something } However its not working. Also it only needs to work on Chrome (so no ...

Compare Python Web Frameworks and their respective HTML5 APIs Implementations

If you are familiar with a specific python web framework that has implementations for HTML5 API(s) ie.WebSockets, Forms, WebWorkers, WebStorage, Communication, Geolocation, Canvas, etc. Then please list the name of the framework and its HTML5 capabilities. ...