Tag Archives: html5

Codeigniter & HTML5 – Trying to Upload Multiple Images at Once

Questions: View Looks Like This <?=form_open_multipart(‘upload/process’);?> <input type=”file” multiple=”multiple” name=”userfile[]” id=”userfile” /> <?=form_submit(‘upload’, ‘Upload’);?> <?=form_close();?> i want the user to be able to upload multiple images at once. once uploaded i want to make an entry of the image details in the database, and finally move the image to the uploads folder. i have basic… 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 »

HTML5 Offline Data Storage Options

Questions: A developer buddy of mine just recently started at a new company and one of his tasks is to come up with a new web application that allows their users to work offline when their staff are onsite in remote locations and then later to sync with a server side database of which they… Read More »

AngularJS HTML5 Mode – How do direct links work without server specific changes?

Questions: Note: This question could also read: How to support bookmarking of hashbang-less client side mvc frameworks in Java. I am transitioning an angular app that uses hashtags to one that is html5mode. I have successfully set $locationProvider.html5Mode(true); And all links from the landing page (index.html) work fine. The problem is, if partial urls are… Read More »

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 »