Entries tagged "HTML"

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]

Disable the Maxlength Attribute on Any HTML Form Field

HTML forms have a feature for limiting the amount of characters someone can enter into a field. While this feature can be useful, be aware that it is easy for the limitation to be bypassed. Let's take a quick look at one bypass method. [Continue reading]

Easy Way to Un-hide Passwords in the Log-in Forms You Use Everyday

Entering passwords into online forms can be challenging. Especially since most (if not all) log-in forms obscure the characters entered for the password. Don't get me wrong; I appreciate that passwords are being hidden. I just wish it was easier to un-hide them. Well, it turns out that there is a relatively quick way to view a password in browsers like Google Chrome. [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 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]

Create Error 404 Page with .htaccess

How does your website handle missing pages? If a page ever gets renamed, moved to a different folder, or removed altogether; what do visitors of the old website address see? If they're greeted with a generic system message, there is a better way. Let's take a quick look at using .htaccess files and creating an Error 404 page to display a more user-friendly message. [Continue reading]

Build HTML Tables Dynamically with PHP Part 3: CSS Alternative

Using HTML tables for design is typically frowned upon in the Web community and the last two posts talked about using tables to display pictures and names in rows of three. For those unfamiliar with the CSS alternative, I didn't want to leave you hanging. So let's look into solving our problem with CSS. [Continue reading]

Build HTML Tables Dynamically with PHP Part 2: Simplify with array_chunk()

Last week we built an HTML table on the fly using PHP. The process required a counter for monitoring which column was being displayed and some tests to determine when to add row tags. Let's look into simplifying the process with a built-in PHP function called array_chunk(). [Continue reading]