Ajax Updates |
- osTicket:: Open Source Support Ticket System
- Validation Hints for Forms
- CodeIgniter – Open source PHP web application framework
| osTicket:: Open Source Support Ticket System Posted: 25 Nov 2009 12:32 PM PST osTicket is a widely-used open source support ticket system. It seamlessly integrates inquiries created via email, phone and web-based forms into a simple easy-to-use multi-user web interface. Manage, organize and archive all your support requests and responses in one place while providing your customers with accountability and responsiveness they deserve. ![]() Related Listings:
| |||||
| Posted: 25 Nov 2009 12:16 PM PST As someone is typing an in an input field, it would be nice give feedback to the user as they are typing if they have satisfied that field’s validation criteria. This article will explain one way of achieving this effect using JavaScript and CSS. Let’s start with field for creating a username. <fieldset> <label for="username">Create a Username:</label> <input type="text" id="username" maxlength="16" /> </fieldset> For our form, in order for the username to be valid, it should be at least 8 characters long, and no more than 16 characters. The maxlength attribute in the HTML takes care of the high limit. As for the low limit, that’s where we can introduce some JavaScript. In English: The function tests to see if the length of what I typed is greater than 7 characters. If so, do something. If not, do something else. function checkUsername(whatYouTyped) { var txt = whatYouTyped.value; if (txt.length > 7) { ... do something to indicate job well done ... } else { ... do something else ... } } As for what to do, what if we took the containing fieldset and changed it’s class to something like “welldone”? function checkUsername(whatYouTyped) { var fieldset = whatYouTyped.parentNode; var txt = stringinput.value; if (txt.length > 7) { fieldset.className = "welldone"; } else { fieldset.className = ""; } } The class can be defined in the CSS to assign a background color to the fieldset. fieldset.welldone { background:green; } We need to check for this validation on every keystroke, so we attach it to the HTML using onkeyup, like so: <fieldset> <label for="username">Create a Username:</label> <input type="text" id="username" maxlength="16" onkeyup="checkUsername(this);" /> </fieldset> A step further to indicate “almost there”. We’ll also have people create a password. We’re a good company, so we let them create a password with as little as 4 characters. But we also feel a sense of responsibility to encourage (not impose upon) people to use longer passwords, at least 8 characters, as a security measure. The HTML for the password field will look like this: <fieldset> <label for="password">Create a password:</label> <input type="password" id="password" onkeyup="checkPassword(this);" /> </fieldset> The JavaScript will be modified to serve an additional outcome based on length. * If the password is at least 4 characters long, that’s good enough to continue. function checkPassword(whatYouTyped) { var fieldset = whatYouTyped.parentNode; var txt = whatYouTyped.value; if (txt.length > 4 && txt.length < 9) { fieldset.className = "almostthere"; } else if (txt.length > ![]() Related Listings:
| |||||
| CodeIgniter – Open source PHP web application framework Posted: 25 Nov 2009 11:33 AM PST CodeIgniter is a powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications. If you’re a developer who lives in the real world of shared hosting accounts and clients with deadlines, and if you’re tired of ponderously large and thoroughly undocumented frameworks: CodeIgniter is an Application Development Framework – a toolkit – for people who build web sites using PHP. Its goal is to enable you to develop projects much faster than you could if you were writing code from scratch, by providing a rich set of libraries for commonly needed tasks, as well as a simple interface and logical structure to access these libraries. CodeIgniter lets you creatively focus on your project by minimizing the amount of code needed for a given task. CodeIgniter Features: * You want a framework with a small footprint. * You are not interested in large-scale monolithic libraries like PEAR. ![]() Related Listings:
|
| You are subscribed to email updates from Ajax Updates To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
| Google Inc., 20 West Kinzie, Chicago IL USA 60610 | |




0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.