How to Get a String’s Length with Javascript
Last Updated on Friday, 8 February 2013 04:29 Written by Richi González Sunday, 10 February 2013 12:00
Hello,
Learn how to get a string’s length with a very simple Javascript property: length. This is really useful when you want to do, for example, field validations with JS; you evaluate the length and then do something.
Learn MoreHow to Center Elements with CSS
Last Updated on Monday, 14 January 2013 12:00 Written by Richi González Monday, 14 January 2013 12:00
Hello,
Having align=”center” deprecated, elements centering is achieved with CSS. There are a couple of ways of doing it, yet I’ll show you two of them. If the first one doesn’t work, the second one will for sure do.
Let’s say we want to have a centered div:
Learn MoreHow to Check if a Record Exists in SQL Database Table with PHP
Last Updated on Saturday, 12 January 2013 12:01 Written by Richi González Saturday, 12 January 2013 12:00
Hello,
Have you been in a situation where you need to check if either a phone number or a user, for example, exists in your database? When I didn’t know how to do that, I looked through several articles looking for the best and most efficient way of doing it until I found this one.
1. Let’s say we have a table called ‘users’ and it has two columns: id, name. This is our table:
Learn MoreWhat is the DOCTYPE Used for Starting HTML5 Code?
Last Updated on Thursday, 10 January 2013 12:01 Written by Richi González Thursday, 10 January 2013 12:00
Hello,
As we all may know, HTML5 era is already here and day by day browsers are becoming more compatible, therefore, we, developers, need to start making our websites HTML5 friendly. Today I’ll tell you the very basic to make our site be read as HTML5.
The Doctype that you see on every page is mainly the big-not-rememberable HTML4 doctype:
Learn MoreHow to Make JS Code Execute After the Page has Finished Rendering (Website Optimization)
Last Updated on Wednesday, 9 January 2013 12:00 Written by Richi González Wednesday, 9 January 2013 12:00
Hello,
When I’m creating a website, I try to make it load as fast as possible. I have read lots of techniques on how to achieve this, and the one that is effortless and free to make it, is having JS code run after the DOM is ready.
1. Open the file where your JS code resides. For this article, I will have the following code between my <head> tags:
Learn More
Recent Comments