News & Blog

Resolving JavaScript ‘Expected identifier’ Error in IE7 and IE8

January 16th, 2013 - Posted by Steve Marks to Javascript / jQuery, Web Development.
Whilst working with a JavaScript object earlier today I found myself coming up against an error in the JavaScript console that read as follows: SCRIPT1010: Expected identifier The error was only present in Internet Explorer 7 and 8, was a little unhelpful to say the least, and was showing ...

New Website Launched For Gifts And Experiences

December 31st, 2012 - Posted by Steve Marks to (X)HTML / CSS, Javascript / jQuery, MySQL, PHP, SEO, Web Development.
This week has seen the launch of a new website of mine, Gifts To Thrill. The site offers experiences such as driving supercars and helicopter lessons, as well as traditional and personalised gifts. Behind the scenes the website acts as affiliate site, meaning that when someone clicks throu...

Converting From jQuery’s .live() to .on()

December 15th, 2012 - Posted by Steve Marks to Javascript / jQuery, Web Development.
If you’ve ever updated the DOM’s contents manually using JavaScript (ie. with the response from an AJAX call), and then wanted to manipulate this updated content, you’ve no doubt needed to use the jQuery .live() function. As of version 1.7 of jQuery however, the .live() f...

Why http://1.2.3.4/bmi-int-js/bmi.js Is Your Friend

December 8th, 2012 - Posted by Steve Marks to (X)HTML / CSS, Javascript / jQuery, Web Development.
Before I get too far into proceedings, allow me to explain a bit of background as to why I’m writing this article. I’ve included below a summarized transcript of a call I had with my ISP a few days ago: Me: “I’m not getting an internet signal” ISP Lady: “...

New Website Launched to Find Attractions Between Two Places

November 12th, 2012 - Posted by Steve Marks to (X)HTML / CSS, Javascript / jQuery, MySQL, PHP, SEO, Web Development.
For regular readers of this blog you might have guessed that I’m a huge fan of maps, and working inparticular with the Google Maps API. I also find that the best way to learn anything in the coding world is to use it in a real life scenario. As a result, and to hopefully produce [......

IE7 and IE8 Ignoring Opacity When Using jQuery fadeIn()

November 3rd, 2012 - Posted by Steve Marks to (X)HTML / CSS, Javascript / jQuery, Web Development.
I’ll dive straight into this one by explaining the problem I came up against earlier this week whilst cross browser testing a feature in Internet Explorer 7 and 8. Let’s look at the following element: What we’ve got here is a black div with 50% opactiy, hovered over the t...

Passing Array to DataTables via aoData Parameter

October 6th, 2012 - Posted by Steve Marks to Javascript / jQuery, PHP, Web Development.
With jQuery plug-in DataTables, you can quickly and easily draw fully functional datagrids. One of the features avalable is being able to generate the data server-side by passing parameters to a script via AJAX. A simple example of this can be found below: var oTable = $('#example').dataTa...

Loading InfoWindow Content using AJAX with Google Maps API

October 5th, 2012 - Posted by Steve Marks to Javascript / jQuery, Web Development.
One of the things I love about the Google Maps API is it’s speed, both from a development point of view and usability. I got asked a question the other day however regarding loading hundreds, if not thousands, of markers, each with an InfoWindow containing an image. The page loading ...

Remove BODY onunload Event After Page Has Loaded

July 26th, 2012 - Posted by Steve Marks to (X)HTML / CSS, Javascript / jQuery, Web Development.
The onunload can be used to perform an action or to call a function when the user leaves a webpage. There are scenarios however when you might want to remove this action after the page has loaded. Take a look at the simple example below where I present a very basic HTML page containing an ...

parseInt() Function Returning Zero For Numbers ’08’ and ’09’

July 26th, 2012 - Posted by Steve Marks to Javascript / jQuery, Web Development.
A very quick one this but one that had me stumped when trying to work with numbers in JavaScript earlier on. Lets imagine we have the number eight or nine but it’s prefixed with a zero. To run it through parseInt() in JavaScript you might think to do the following: var myNumber = par...