 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPMaster.com: Tracking Upload Progress with PHP and JavaScript
by Chris Cornutt February 06, 2012 @ 13:58:32
In a new tutorial today from PHPMaster.com, they show you how to combine Javascript and a PHP feature to track the progress of an upload to your web application.
A problem that has plagued web developers for years is how to add real-time information to their applications, such as a progress bar for file uploads. [...] JavaScript can access a file's name, type, and even the width and height of a local image, but it wasn't until HTML5 that it could access a file's size. [...] In this article I'll show you how [the session.upload_progress] feature can be used to create a simple upload progress bar without any external libraries or browser dependencies.
The tutorial provides all the steps you'll need to get it working - defining the form with the extra required field, styling it and plugging the Javascript in to call a small script to get the progress of the upload. It returns the difference between the content-length of the file and the current size (as a percentage of 100).
voice your opinion now!
track upload progress extension javascript tutorial progressbar
Script-Tutorials.com: Form Validation with Javascript and PHP
by Chris Cornutt February 02, 2012 @ 09:07:40
On the Script-Tutorials.com site today there's a new tutorial about form validation using a combination of jQuery on the frontend and PHP on the backend.
In this tutorial, I will show you how to create an attractive, pleasant to look form for your website and then I will explain you how to dynamically validate them using Javascript. We'll also cover server-side validation with PHP to make everything 100% safe. This tutorial will help you to add more functionality to your forms which leads to better user experience and better quality of your website.
His sample form (name, password, email and gender) is made from some pretty simple HTML markup. The real trick comes with the jQuery validation on each field handled in an onKeyUp. Included are both a "password strength" method and an email validation method to check the format of the address. Errored fields have their background color changed to indicate that they've failed and some basic validation (length, password match, etc.) are also included. The PHP does much of the same validation once the form is posted and returns any error messages that might have come up.
You can download the code or try out a live demo to see the scripts together in action.
voice your opinion now!
form validation jquery javascript frontend backend tutorial
DZone.com: Assetic JavaScript and CSS files management
by Chris Cornutt August 05, 2011 @ 09:19:26
On DZone.com today Giorgio Sironi introduces you to Assetic, an asset management tool that helps you keep things organized and easily requested by your application.
Assetic is a PHP library for managing the deployment of your assets: JavaScript, CSS and other resources which will be requested by the browser. The library has been created by Kris Wallsmith from OpenSky, an e-shop where many of the active members of the PHP community work, or worked (see Jonathan Wage/Doctrine 1 and Bulat Shakirzyanov/Imagine.)
Giorgio compares it to the more traditional method (putting them in a public folder) and how Assetic gives you an advantage over this setup. The main feature of the tool is to bundle all of your assets into one file that is then sent to the browser and interpreted there reducing the need for HTTP calls to request multiple files. An example is included showing the creation of an asset collection and the output of the files all combined into one string.
voice your opinion now!
assetic asset management css javascript public organize
Sander Marechal's Blog: A YuiCompressorFilter for Phing
by Chris Cornutt August 02, 2011 @ 09:16:37
Sander Marechal has been working with Phing in some of his recent development and has created something useful for compressing Javascript and CSS files on the deployment of your application - a YuiCompressor task.
I am going to write several useful extensions, the first of which is a YuiCompressorFilter. Phing already has support for a JavaScrip minifier in the form of the JsMinTask, but the yui-compressor is more useful. Not only does it usually compress better than JsMin, it can also compress CSS files. Also, because my YuiCompressor extension is implemented as a filter instead of a task you can do fancy things like minifying and concatenating files in a single step.
He includes both a sample of the task and it's configuration (the XML) in the post as well as a link to its source over on github.
voice your opinion now!
javascript compress phing task css
|
Community Events
Don't see your event here? Let us know!
|