html5

Problem in Javascript colors and canvas.

I have used this code to exactly try to have the RGB code of color: var huePixel = HueCanvas.css('background-color').match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);//["rgb(0, 70, 255", "0", "70", "255"] var svPixel = SVCanvas.get(0).getContext("2d").getImageData(satPos,valPos,1,1).data; //opacity*original + (1-opacity)*background = resulting...

How to make <div>s in HTML5 draggable for Firefox?

Hello, I am playing around with the HTML5 features, and I want div's (and similar containers like articles, sections, etc.) to be draggable. Consider the following code: <!DOCTYPE html> <head> <title>A Simple Draggable Object</title> </head> <body> <h1>Test #1: A Simple Draggable Object</h1> <div draggable="true">This text ...

Local Storage Exposed to Users

Are the values of items stored using the localStorage API viewable by users? Just like cookies? ...

The Javascript Datastore Problem

This might sound super crazy but I really want to know if this can be done. Assume a multi-user site that gives users some tools to build web apps from the site itself (using only HTML/CSS/JS) and share them. Now, if each of the apps were to be assigned a datastore, say just a table for convenience, is it possible to make secure query/i...

HTML5 App Cache not working with POST requests

Hello, I'm working on a web application and I went through the necessary steps to enable HTML5 App Cache for my initial login page. My goal is to cache all the images, css and js to improve the performance while online browsing, i'm not planning on offline browsing. My initial page consist of a login form with only one input tag for en...

Displaying a <div> over a <canvas>

The problem, which exists in both Firefox and Chrome, is that I have a canvas with a solid background, and a div with a solid background color/image. The div is margined up over top of the canvas. The div does not display over the canvas. An interesting note is that if there is text inside the div it will properly get displayed. This wou...

Find out which object was clicked on a html5 Canvas

Suppose i have a html5/canvas application in which i can place objects on a drawing-canvas. Some kind of diagram editor, something like Visio (but much simpler) Is there a framework which helps me find which object is clicked/draged? An option is to capture the click-event and iterate over all my objects (in a semi-smart way) and che...

Load multiple files using HTML5 and PHP

I am trying to load multiple files using HTML5. This is my code I found on some site. In the PHP code it doesn't recognize it as an array. Am I doing something wrong? Can someone show me a working solution? Thanks. index.html <form action='save.php' method='post' enctype='multipart/form-data'> <input name="uploads" type="file" multip...

HTML5 validated by W3C (Working in Chrome, Firefox, Safari) Black screen in IE8

Evening all. I have created a basic HTML5 site. It validates in W3C validator. It seems to work fine in Chrome, Safari, Firefox etc. However, upon opening the page in IE8 I just get a black screen. The site can be found at www.soultrainer.co.uk I assumed I had missed a bracket out or something. However I am receiving 0 error messages...

Differences between Blackberry Webworks and Phonegap

I am building an enterprise application using HTML5 for Blackberry OS 6.0. I am planning on using PhoneGap for developing the application. I found out that Blackberry also has something similar called WebWorks. What are the differences between WebWorks and PhoneGap? ...

How do you change video src using jQuery?

How do you change the src of a HTML5 video tag using jQuery? I got this HTML: <div id="divVideo"> <video controls> <source src="test1.mp4" type="video/mp4" /> </video> </div> This doesn't work: var videoFile = 'test2.mp4'; $('#divVideo video source').attr('src', videoFile); It changes the src if I inspect it using firebug,...

Are there any examples of sites that use the role attribute in HTML5/XHTML?

I've been looking at the use of the role attribute for HTML5/XHTML in the W3C: http://www.w3.org/TR/wai-aria/roles and was wondering if there are any sites that use this or examples of how/when to use the role attribute. I understand how it works, but would like to see how other people have used in their sites/projects. Also, am i corr...

How do I use one canvas element as the backdrop for another canvas element?

I am working through the HTML5 canvas tutorial on the following website: Mozilla Developers. In this tutorial, they say that you can use a canvas element as the backdrop of another canvas element. I have tried to do exactly that with the following html page. Unfortunately, the debugger in chrome says failed to load resource. Am I referen...

HTML5 with Web Services

Now the case, I want to develop a iPhone apps/web apps using Phonegap. Ok, imagine the app can do all sort of thing include data processing, transaction, login, video streaming, display data from the web services, so to do this I need use JavaScript (Ajax) to call the web services, then only put it into the HTML? HTML5 now come with sup...

javascript + asp.net - Calling javascript functions from c# and passing an object

I'm fairly new to web development. Basically I'm using a HTML5 canvas to render content, and javascript functions which clear and render to the canvas. I'm hoping to call a web service to get data that would affect content, which I believe is most easily done from C#, and was wondering how I could use this to periodically call a javasc...

How To Get DIV Coordinates Within HTML5 Canvas?

Is there a way for me to get the absolute position of a DIV element within a HTML5 Canvas element? Any help is greatly appreciated. ...

HTML5 Conformance Checker

Hello, I got the following warning using the W3C validator: "Using experimental feature: HTML5 Conformance Checker." What exactly does it mean? That I can't count on this validator? Thanks, Joel ...

Convert readAsBinaryString() results back to Binary in Javascript

After converting a File to a BinaryString in HTML5 via the FileReader readAsBinaryString() method, is there a way to convert the data back to binary in JavaScript? ...

HTML5 Video: Retain aspect ratio when resizing

I have a video element set to 100% width in a container div. That div has a max-width of 800px and min-width of 400px. When resizing the browser I need the video element to resize while retaining its original aspect ratio. Currently it resizes in width but remains its original height, adding letterbox bars above and below to make up for ...

HTML5 canvas stroke() thick and fuzzy

I'm trying to allow the user to draw a rectangle on the canvas (like a selection box). I'm getting some ridiculous results, but then I noticed that even just trying the code from my reference here, I get huge fuzzy lines and don't know why. it's hosted at dylanstestserver.com/drawcss. the javascript is inline so you can check it out. I ...