Tag Archives: html5

HTML5 File Upload to Java Servlet

Questions: My question kind of says it all. I am currently using Uploadify (Flash + Ajax) to the Servlet (Commons Upload w/ OWASP ESAPI overlay) with success, but I was wondering how I would go about building in HTML5 support, or rather HTML5 with flash support. I know how to get the HTML5 DnD working,… Read More »

HTML filter that is HTML5 compliant

Questions: Is there a simple approach to add a HTML5 ruleset for HTMLPurifier? HP can be configured to recognize new tags with: // setup configurable HP instance $config = HTMLPurifier_Config::createDefault(); $config->set(‘HTML.DefinitionID’, ‘html5 draft’); $config->set(‘HTML.DefinitionRev’, 1); $config->set(‘Cache.DefinitionImpl’, null); // no caching $def = $config->getHTMLDefinition(true); // add a new tag $form = $def->addElement( ‘article’, // name ‘Block’,… Read More »

HTML5 audio element with dynamic source

Questions: I have a basic audio player: <audio controls=”controls” autoplay=”true” loop=”loop”> <source src=”song.php” type=”audio/mpeg” /> </audio> And instead of the source pointing directly to the MP3 file I have it pointed at a PHP file which then points to the MP3 file, which works. But, when the current track is over the PHP file is… Read More »

HTML5 input type file's multiple attribute not working in IE?

Questions: I want to create a multi file uploder using HTML5 and PHP5. I don’t want to use any flash player for support. Flash uploader will not support in iphone. I created the form like this <form name=”uploader” method=”post” action=”” enctype=”multipart/form-data”> <input type=”file” name=”images[]” id=”images” multiple=”multiple” /> <input type=”submit” name=”button” value=”Submit” /> </form> It is… Read More »

Escaping/encoding single quotes in JSON encoded HTML5 data attributes

Questions: In PHP, I use json_encode() to echo arrays in HTML5 data attributes. As JSON requires – and json_encode() generates – values encapsulated by double quotes. I therefor wrap my data attributes with single quotes, like: <article data-tags='[“html5″,”jquery”,”php”,”test’s”]’> As you can see, the last tag (test’s) contains a single quote, and using json_encode() with no… Read More »

mp4 from PHP – Not playing in HTML5 Video tag

Questions: I am using the video tag to play videos. I using php files for the playback like this: <video id=”playvideo” preload=”auto” width=”845″ height=”395″ poster=”http://video-js.zencoder.com/oceans-clip.png”> <source src=”../getvideo_webm.php” type=’video/webm’ /> <source src=”../getvideo_mp4.php” type=’video/mp4’/> <source src=”../getvideo_ogv.php” type=’video/ogg’ /> </video> All .php files are playing fine when i check them directly in the brower. But the above setup… Read More »

uploading a file in chunks using html5

Questions: I am trying to upload a file in chunks using html5’s File API and then reassembling it on the server side in php. I am uploading a video but when i merge the files in server side the size has increased and it is becoming a invalid file . Please note the below html5… Read More »

Cross browser HTML5 storage library [closed]

Questions: I have one requirement where should be stored locally when internet is not available. It should handle it in cross browser compatible way. Now as I know there are variety of options to store the data locally (indexedDB, WebSQL, localStorage). All I really want is a unified API. I don’t want to detect and… Read More »