Archive for the ‘Html’ Category

HTML5: Display local images without going to server

Wednesday, January 25th, 2012

Note: assuming jquery

// get the input element
var $fileElement = $("input[type='file']");
var $image = $("img:first");

// on change
$fileElement.on("change",function(){
   if (this.files && this.files.length > 0){
       var file = this.files[0];
       var reader = new FileReader();
       reader.onload = function(e) {
	   $img.attr("src", e.target.result);
       }
       reader.readAsDataURL(file);
   }
});

HTML5: iOS like spinning wheel in HTML5/CSS3

Friday, May 20th, 2011

iOS Spinning Wheel in HTML5/CSS
http://cubiq.org/spinning-wheel-on-webkit-for-iphone-ipod-touch

Simple WebApp to create mock data

Wednesday, August 25th, 2010

http://www.generatedata.com/#generator

HTML: 25 HTML5 Tips

Monday, August 9th, 2010

http://net.tutsplus.com/tutorials/html-css-techniques/25-html5-features-tips-and-techniques-you-must-know/

HTML5: Charts libs (JQuery, Raphael, Flash, Google)

Wednesday, February 3rd, 2010

HTML: Force download for .gif, .png, .pdf

Thursday, December 3rd, 2009

Set content-disposition: attachement; filename=”…”

HTML: Firebug Console Log

Saturday, April 18th, 2009
if (window.console && window.console.log)
   window.console.log('hilight selection count: ' + $obj.size());

HTML: AJAX Modal Dialog Box

Wednesday, March 25th, 2009

Here are some JQuery puglins for creating Modal Dialog Box:

  • Facebox: Facebook L&F, does have some images for corners.
  • SimpleModal: Seems simple and lightweight.
  • ThickBox: Seems complete but quite heavy (also, not very well maintained, last change log was from 2007).

OpenWeb: Web-Based HTML Editors

Wednesday, February 11th, 2009

Here are few Web-Based HTML editors I found (HTML-Area seems to not be maintained anymore)

HTML: Link with OnClick and blank Href

Thursday, October 30th, 2008
<a onclick=”myFuction(event);return false;” href=”">Some Text</a>

The return false; prevents the browser to follow the href link. Note that have the method return false does not work.

Using HREF JavaScript Links