Posts

Showing posts with the label AJAX

First AJAX steps implemented

Image
I got the first step of the checkout process Ajaxified today on the live site. Because of all the issues I could cause by installing Norton, disabling JavaScript, etc. that I'm actually just giving "Helpful hints" if some input is wrong. For example, an invalid postal code or an invalid email address. Now I get to start checking for valid postal addresses and trying the same thing. A bit trickier, and a lot more possible instances. For example, is it valid, not valid, valid with multiple matches or invalid with multiple matches? Now, how do I convey all those messages? Should prove interesting.

Validating email addresses within forms

I'm starting to work on developing an AJAX-style checkout process and came across something pretty cool. It uses a combination of a server-side Perl script, a Perl module, some JavaScript and a simple HTML form. The first thing I had to do was install the Mail::CheckUser module. The installation on all 5 servers I tried it on didn't want to work via normal methods, and 'make test' always came back saying it had errors, but doing a 'make install' let it install and it works just fine, even with all of the errors reported by the test step. The next thing to do was create a real simple Perl script to check it out. I simply called it validate.pl (since it's part of a form validation routine) and loaded it to a web server with the correct permissions, then replicated it across the rest of our servers. The actual work is done by the following chunk of code. #!/usr/bin/perl print qq(Content-type: text/plain\n\n); use CGI qw (:standard); checkEmail(); exit; sub che...