Author: Tom
-
Force JS replace to work on all occurrences of needle
When manipulating strings in JavaScript a useful method to know about is the replace() method. It take 2 parameters – the needle and the haystack. So if you wanted to replace ‘cat’ with ‘dog’ it might look something like this: var myString = “The cat jumped over the fence”; var myNewString = myString.replace(“cat”,”dog”); document.write(myNewString); Great it worked.…
-
Build an early sign-up mailing list system
Note: This article has been marked for a quality review and will soon be updated. When you’ve got a great idea for a product its often hard to resist buying up the domain name for it, but what do you put there? A coming soon logo? A paragraph about what you’re making? How about allowing…
-
Spice up your Hyperlinks!
Now the words ‘hyperlink’ and ‘sexy’ rarely frequent the same sentence in my household, but something which appears to have come into fashion lately (namely I’m using it ;)) is the fading in of the hover state on hyperlinks. So instead of simply specifying the :hover state in your CSS, you use JavaScript or CSS3…
-
Building a Confirmation Dialog in JavaScript
Note: This article has been marked for a quality review and will soon be updated. A common feature of desktop applications is that when a user prompts a potentially destructive action, the program will display a confirmation dialog to ensure that the user doesn’t go and do something silly. To do this we will use…
-
An introduction to OOP
Note: This article has been marked for a quality review and will soon be updated. Object-orientated programming is a concept that is more likely to pop up when programming desktop applications rather than those for the web. But once you start using OOP you will wonder why you ever used procedural programming (that’s simply using…
-
Protect your assets with expiring URLs
Note: This article has been marked for a quality review and will soon be updated. A problem that many web developers face is how to protect their assets. Specifically ones that users are supposed to pay for – say a video training site for instance, you don’t want every Tom, Dick and Harry being able…
-
Generate a calendar with PHP
Note: This article has been marked for a quality review and will soon be updated. Calendars are useful for a wide variety of things, least of all planning and recording events that are going to happen in the future, and while it may not be obvious at first, there a are a number of challenges…
-
CSS From Scratch
Continuing the series of learning web development from scratch is my introduction to CSS. In the video I go over how to add style to the killer robots site and introduce simple CSS to enable you to make your sites look awesome! As always leave a comment below if you need anything clarifying, and you…
-
HTML From Scratch
I am often asked where to find quality tutorials on beginning learning HTML and all that jazz, so I thought I’d make a video! This is the first in a series I call “From Scratch” that aims to teach total newbies how to make web-pages, I hope the video explains it all well enough and…