Entries tagged "Web Development"
How to Test Form Submissions: Using Google Chrome to Change Form Values

When forms are set to the POST method, it may not be apparent how you can test responses made through fields like radio buttons. Of course, you can click each radio button to make sure each individual value can be submitted. But how do you make sure that someone can't tamper with the form and submit an invalid value. Let's take a look at how the browser can help. [Continue reading]
How to Test Submissions from Forms that Use the POST Method
An important part of developing online forms is testing. One area of testing I've always wanted to better with is making sure input types like radio buttons can't accept values which are not allowed. In this week's post, we go over my primary method of testing. That way we can discuss a faster way next time. [Continue reading]
My First WordPress Plugin: Generates a Bulleted List of Clickable Blog Post Titles

I recently helped with a redesign that involved building a website with an out-of-the-box WordPress theme. The theme met our needs for the most part, but we were looking for something to dynamically generate an FAQ page from blog posts tagged with "FAQ". After trying some third-party plugins which didn't quite work for us and attempting to modify the theme files directly, I decided it was time to build my first WordPress plugin. [Continue reading]
Experiment with CSS without Uploading Any Files

There are occasions where I upload the same CSS file dozens of times just to adjust padding around an image or to get a font size just right. Well, much of this work could be avoided by leveraging tools built into browsers like Google Chrome. We spent a little time in the last post talking about using the Developer Tools panel to remove content that gets in the way. This week we'll delve deeper and see how the Styles tab can help. [Continue reading]
Check Array and Object Values in JavaScript with console.dir()

The alert() method in JavaScript is useful for quickly seeing what a variable contains as the program executes, but it has some limitations. It won't display the values stored in an array without creating a loop, for example. If you do create a loop, alert boxes can be aggravating since they each need to be confirmed separately. Luckily, there is another JavaScript method. [Continue reading]
Make Sure Things Are Working Correctly in JavaScript with the alert() Method
My usage of JavaScript can be a bit sporadic. There are times when I go months without writing a line of JavaScript code. So I find myself forgetting how to do certain things. It also doesn't help that most of my time is spent with PHP which adds to the confusion since the languages have different aspects to them. To help get my bearings, I've used JavaScript's alert() method to quickly see things like what value a variable contains. Let's look at a simplified example showing how I use alert(). [Continue reading]
Alternate Way to Write PHP Function Arguments Part 3: Manually Throwing Errors

Using associative arrays for function arguments allows for more flexibility. However, we do lose some important features when it comes to building and calling functions. Packing all those arguments into an associative array prevents PHP from automatically detecting when required arguments are not included. But, there is a way to simulate this feature. [Continue reading]
Alternate Way to Write PHP Function Arguments Part 2: Using Associative Arrays
The standard process for building user-defined functions is to manually list out the arguments. The problem with this method is that the arguments need to appear in the order given. If the function has several optional arguments, you need to pass a value for all arguments just to specify the last one. Well, let's look at an alternate way to write functions which provides more freedom. [Continue reading]
Alternate Way to Write PHP Function Arguments Part 1: The Standard Process
When calling user-defined functions, there are occasions where it feels like optional arguments become required. I've seen third-party solutions like WordPress find a way to get around this issue. But it wasn't until recently that I've attempted my own solution. Before getting into an alternate method of passing function arguments, however, let's look at the standard process. [Continue reading]
Alternate Way for Adding Labels to Online Forms

To make HTML forms more accessible to those using assistive technology like screen readers, we need to use <label> tags to associate the field labels with the corresponding fields. It wasn't until recently that I realized you don't always need to add an id attribute to field that you're attaching the label to. There is another way and it requires less typing. [Continue reading]