Cause a field to be auto-focused when the page is done loading
So, wouldn’t it be user friendly, if when you went to a form page in a document, if the cursor was automagically positioned at the first field in the form? Why, yes it would. Try: Event.observe(window,...
View ArticleEmbedding Web Fonts: A cautionary tale
So for work, the designer says “Hey, can we use this font in the webpage” and like an idiot, I say “sure, why not?”. Well, FF and Safari don’t support .otf files (for whatever reason) So I download...
View ArticleGet latitude and longitude of an address using google maps
Google doesn’t make it easy to show you the latitude and longitude of an address you search in google maps, but there’s an easy way to get the info. go to google maps, type the address, and click...
View ArticleRun JavaScript function every n seconds
//tell javascript to run a function in 1 second setTimeout ("myFunction()", 1000 ); function myFunction(){ //do stuff //once the function is finished, queue this function up to run again in 1 second...
View ArticleASP.Net 301 Redirect
<script runat="server"> private void Page_Load(object sender, System.EventArgs e) { Response.Status = "301 Moved Permanently"; Response.AddHeader("Location","http://www.new-url.com"); }...
View ArticleDrop-in jQuery placeholder fix
If you want to enable the “placeholder” attribute of input boxes in browsers that don’t support it, simply download this file, and include it anywhere on your page. It will copy the native...
View Article
More Pages to Explore .....