This tutorial will show you how to create an AJAX form with PHP and jQuery. The AJAX form doesn’t look any different to an ordinary HTML form, with the exception of making sure that when we submit the form, it calls a javascript function rather than pushes the user to a page (causing a new page reload). I’ll also demonstrate how we can use ‘loading’ animation for the AJAX form, [...]
Need to limit the number of characters that are allowed to be entered into a textarea? I’ve crafted a little snippet that you can drop into your projects to achieve just that! It also provides a counter to the user, showing how many characters are remaining as they type. Your browser doesn’t support IFRAMES. You can see the textarea character counter here. This could be extended pretty easily, so that [...]
I was working on a project today, and I needed to convert a PHP based multidimensional array into a Javascript array, so that I could use it for a dynamic select dropdown (depending on the top level category chosen, the next level select dropdown would be populated with the child elements of the top level category options – if you follow me!). Anyway, I soon realised that converting the PHP [...]
Lots of tutorials coming up in the next few days – seeing as you guys are actually enjoying them! This is a really simple tutorial on how to write a jQuery plugin. It’s also a usable “Default Text” plugin, which sets some preset text in a form input, which clears when you focus the fiels. It’s not as comprehensive as some other articles out there, as I wanted to keep [...]
Have you ever had a problem where you get a HTTP 403 error from submitting a form? Does this form have a field that submits a URL? If yes to the above two questions, I think I know the problem you’re having, and have a solution. It’s to do with mod_security (an Apache module) and the ‘http://’ part of the URL.