I created this page as a running repository of useful, miscellaneous web notes for later reference.

Javascript & JQuery

How to get the latest version of JQuery:

alert('JQuery: '+$.fn.jquery);   // Outputs JQuery: x.x.x

Useful info about Javascript and JQuery source maps — an explanation about what they are and how they are used:


Parsley — A reliable and easy Javascript form validation library:


Get hostname in Javascript:

// For the host name only, use:


Server Notes, LAMP/WAMP

Latest WAMP install instructions — in less than 5 minutes you can deploy WAMP with MySQL server on localhost.  Not bad for quick local dev server.



A utility for Symfony to convert those awful annotations to YML files:


Helpful Symfony 3.0 base commit, to start new PHP Symfony projects:


Best example of a form collection at work I think is here (many thanks to the programmers making these publicly accessible!)


Symfony 2 performance tips:


Form Type setDefaultOptions weird error:


General Web Notes & Utilities

Free OST file viewer worked well, allows you to save a person’s Microsoft Exchange mailbox email file and open and view the contents without messing with the .ost file in Outlook!


Waka Time — Free web development time tracking utility:


Websites that show the latest hiring trends in the tech industry:


A good simplified explanation and list about HTTP 2:


Good article about the anatomy of a URL:


Steps for setting up DNS on a Ubuntu server:



PHP SQL injection – good article:


Aaron Belchamber
22 years experience in marketing and building businesses

Senior PHP & Symfony Web Developer, Business Analyst, Marketing Director
Belchamber.us / TopDocsTalk.com
(904) 294-0803 • Jacksonville, Florida

The JQuery UI library’s Datepicker function is very convenient.  Here’s a way to override the date field if you want to allow the user to also input the time of day along with it without adding an extra field and deal with merging the values in the backend.  You can also add “+d.getSeconds()” if you want to allow seconds, but I find that’s wasted space.

        dateFormat: 'yy-dd-mm',
        onSelect: function(datetext){
            var d = new Date(); // current time
            datetext=datetext+" "+d.getHours()+":"+d.getMinutes();


On occasion, you’re going to have some mammoth form that doesn’t validate properly with any Javascript validation library.   One event is when the form you are given to deploy has a lot of checkboxes and one of those checkboxes needs to be checked to be valid.  The easiest way to make sure this happens is to create a form submission even listener then if there’s at least one checkbox checked, it returns true at which time it triggers the form validation OR it sends the “e.preventDefault()” command, which will stop any further processes, in this case, triggering the form submission which would then trigger the validation.  It’s kind of pre-submit validation, but to me, it’s the fastest way to “piggyback” on the existing form validation if everything else works properly.

Here is a sample, and this is the form library that I think is incredibly reliable, clean, and very easy to use:



   if ( $("input[type='checkbox']:checked").length > 0) {

   else {

         alert("Please check at least one category you wish to be listed in.");
         return false;

   return true;



This works well CDN’d with Symfony form projects.

Here’s how you can get the image width and height of an image file at a remote URL.

function getImgDims(url){
   var img = new Image();
   img.onload = function(){
      var rtnArr=Array;
      return rtnArr;

This will return an a multi-element associative array containing values under “width” and “height” as its keys.

All browsers have their idiosyncrasies — Internet Explorer had so many Microsoft is changing its name.

Here’s another one of a hundred browser “idiot syncrasies” that wasted so much time.  I’ve always developed sites first for Firefox then Chrome then found I had to add more hacks on top for IE, the infamous “shiv” code still makes me shake my head — if only we didn’t have to waste so much web development time worrying about all those browsers and devices and focus on the solution.  If only we’d know the standard tires would work on every standard road!  Things are getting much better and standardized, but even the surge of Chrome users may find the latest updates are causing interface issues and new UX challenges.

One issue is dealing with forms, autofills and validation.  For Google Chrome, I wasted hours with a form auto fill behavior and discovered you have to set  autocomplete=”false”  instead of to “off” for the fields you don’t want the browser to automatically reset and take over.   It can cause real problems with certain forms that keep defaulting to the wrong state in a credit card because a user entered a different state elsewhere and didn’t notice it.  This could be the difference between making a sale or a customer leaving because the credit card information is incorrect.

For web developers out there, you all know Stack Overflow, this is the usually the first place web developers look when they are stumped, this is one of those times where once I realized it was a Chrome issue it took me two minutes to Google the problem, find the problem on Stack and implement the change.  It’s great when you encounter an odd problem and find the exact solution so quickly.

Here’s the link for more information, I hope this helps someone save some time!