ElanMan

 

An example of what you’re creating can be seen here.

The complete script can be downloaded here AjaxRequest (30.91 KB) Create your first AJAX Request :)

In the first part, we created a function, getRequestObj(), that we can now use to initiate a new XMLHttpRequest object. Continue reading »

 

AJAX is now everywhere on the web. The ability to update content on the web page without reloading the page provides a slicker experience to the user whilst also reducing the load on the server (the server only needs to output the updated content and not the entire page).

Continue reading »

 

We’ve already covered ‘creating a random image with JavaScript’ but the best way to produce a random image on each page load is to use PHP. Using PHP, you are not relying on the browser supporting JavaScript at all and everyone will see the random images.

OK, to start, we’ll create a function called randomSelect(). This will take two parameters; the directory to scan for images and an array of the allowed file extensions to use.

Continue reading »

 

To make it easier for your visitors to visually separate similar elements in your web page (such as table rows, paragraphs, list items etc), you can give alternate elements a different background colour. You can achieve this using a server-side script but here’s a really simple way to do this using JavaScript.

Continue reading »

 

If you have required fields in a form, a nice visual clue for the user is to have a message ‘pop up’ if the field hasn’t been filled in. A simple example of what I mean can be seen here.

Continue reading »

 

What is pagination?

Simply put, pagination is splitting up many results in to bite size chunks (pages) that helps the user quickly sort through the results instead of having to scroll way down the page to find what they’re looking for.

Continue reading »

© 2012 ElanManSuffusion theme by Sayontan Sinha

Page optimized by WP Minify WordPress Plugin