html5

Canvas in HTML5: Removing Previous Rectangle

I've been messing around with the canvas element in html5, and this is what I've got after a bit of experimenting function canvasMove(e) { var canvas = document.getElementById('game'); if(canvas.getContext) { var draw = canvas.getContext('2d'); draw.fillStyle = 'rgba(0,0,0,0.5)'; draw.fillRect('10', '1...

What website features are essential for attracting IT Pros from corporations?

I'm developing a set of websites that are geared towards the IT Professional at businesses ranging from 10 to 5,000 employees (small/med business). Most IT Professional expects a certain set of features when dealing with blogs, forums (such as gravitar)... but what I'm most interested in are the ~other~ addins that would be used in a si...

After watching an HTML5 video in fullscreen in an iPad how do you close the fullscreen?

Go to YouTube.com in Safari on an iPad and watch any video on full screen. At the end of the video the full screen will close out and bring you back to the web page. How the heck do they pull this off? ...

New site - XHTML 1 Strict or HTML 5

I'm beginning a very large project in the coming weeks and am trying to decide if I should take the leap into HTML5 land or stick with my time trusted XHTML 1 strict. The site will be huge. Thousands of pages, video, custom CMS system, lots of social media integration, etc. I'm trying to justify using the new technology, but am unsure...

HTML code for INR

For pound () there is HTML code £. For INR can you please tell me the HTML code? ...

How can the colors of an image be changed using CSS3?

This works: a { color: hsla(0,100%,50%,0.2) } And this does not: img { color: hsla(0,100%,50%,0.2) } Is there something like img { opacity: 1 } that allows to define hsl values to an image? ...

Present XMLHTTPRequest Response to the Client?

I am using an XMLHTTPRequest to fake a RESTful interface. After the response object returns data from the request, how can i present that to the user? For example, in a PUT request, the server actually responds with a full HTML page of data (in most cases), and i want to display this whole page to the client. Any idea how? I'm sure there...

How to resize the rangeinput handle after creation?

I am using this http://flowplayer.org/tools/demos/rangeinput/scrollbar.html ( as a horizontal scrollbar ) When resizing using: $('.handle').css('width', 550+"px"); or $(".handle").width(550).click(); after changing the handle width from 800px to 550px ( while using a 1000px width slider ) the handle cant be draged until the end of...

what is getCSSCanvasContext() method of an HTML5 element

what is the getCSSCanvasContext() method. i sow it in chrome debuging console, but cannont find any decent documentation for it. does it mean we can draw using canvas commands on any element? ...

Drawing images with canvas is more efficient than let browser to render it?

It seems google images search is using canvas to draw images and original images are hidden from the beginning. Have anyone tested that? ...

Is there a way to achieve Photoshop-like multiply, difference, etc layer effects with Canvas?

Hi, The title should say it all, I am looking for a way to achieve Photoshop-like layer effects such as multiply and difference (and screen) for Canvas + JavaScript. Also, is there a blur effect for Canvas? ...

HTML5 WebSockets, onmessage event.data comparison

Hi everybody, i am working on an HTML5-Application which uses WebSockets. My WebSocketServer sends a message to the WebSocketClient. The Client should now, based on the received message, trigger an javascript function. Here is my example-code: socket.onmessage = function (event) { if (event.data == "someAction") { ...

Does it make sense to use Web Workers for a game?

Hi, I am working on a game that has AI logic, movement, etc and drawing. Does it make sense to calculate moving and AI logic using Web Workers? But how do I do that -- because the workers need to know so much about the main thread like the positions of certain objects for collisions, amount of bullets, etc. It feels like impossible beca...

How do I load a bitmap file into HTML5's Canvas

I am trying to load a bitmap into the canvas following the example here. Here is my code: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>HTML 5 Reports</title> <script type="text/javascript"> function draw() { var ctx = document.getElementById('canvas')....

How does Typekit work behind the scenes?

I'm curious if anyone has an idea about how this stuff works behind the scenes. I'm interested if there is a way to host your own fonts and also if those would work for all major browsers out there? ...

Is there a way to set HTML5 drag end effect? (i.e. no revert)

When finish dragging a HTML5 draggable element, the element will revert back to its original location. Is it possible to prevent the feedback image to revert? Instead of reverting back, I want the feedback image to disappear after the drag is completed. ...

How safe is "the future of browser gaming"?

HTML5 will be widely adopted as a way to design games, is the prediction. But I have my questions about this: how can an online HTML5 game ever be secure? Let me give you an example: imagine this platform game where you gain badges when you win, for example, an extremely hard level. When you have actually won this badge, a request is ma...

synchronizing executeSql in Safari (WebKit) Web Sql database

WebKit (Safari 4+ is my focus) has a feature called Web SQL. Web SQL is specified in the W3C draft Currently only the asynchronous flavor is supported. I have a situation where I want to synchronize couple of operations - writing to database (using CREATE TABLE query and then a loop through INSERT queries) and then reading from the dat...

problem using HTML5 for Cross-origin resource sharing

Hi, I am new to this site and had been successfully using the "HTML5" Cross-origin resource sharing (CORS) to POST data to my server. I just recently tried to include GETs in that as we are trying to have all of our communications be non-reliant on a JavaScript library. In doing so I have run into an odd issue that seems somewhat fixable...

Grouping table data into columns rather then rows

Most of the time it makes sense to organize table data in rows. However right now I'm dealing with a table that compares data across several columns. Each column is a product, so I'd like to keep all product data grouped together. <tr> <td>Name</td> <td>Price</td> <td>Weight</td> <td>Height</td> <td>Compatibility</td> <td>...