Ning Ma blog

my technology tips

AJAX

jQuery large pictures with a loading spinner

Basic Version In our basic version, we will have a single div containing a loading spinner and once our large image is loaded (in the background) we will remove the spinner and insert our image. There’s a few ways to approach the loading screen, two of which are: Use a background image on the holder […]

Good example to security ajax call

Step-1 : Generate Token System For All Web-Service: Generating Token :

Step-2 : Use it while sending ajax call:

Step-3 : NOW, Let’s secure ajax handler PHP file with,

jquery render with object javascript and ajax example

HTML

Javascript

Ajax return data(JSON)

Memory Game

Game link: http://www.maning.ca/ats/memory-game/ Download Demo: http://www.maning.ca/ats/memory-game/memory-game-Demo.zip “Memory game is a card game in which all of the cards are laid face down on a surface and two cards are flipped face up over each turn. The object of the game is to turn over pairs of matching cards.” I used half day to program this […]

A good ajx upload library

This plugin uses an XMLHttpRequest (AJAX) for uploading multiple files with a progress-bar in FF3.6+, Safari4+, Chrome and falls back to hidden-iframe-based upload in other browsers (namely IE), providing good user experience everywhere. It does not use Flash, jQuery, or any external libraries. http://valums.com/ajax-upload/

Hide the Target URL of a Link in Status Bar

There are some instances where you have redirect the user through one page to get them to another page. There is a way to do this stealthily – without letting the user know that there was a redirect. Yes – it sounds evil – but it don’t have to be. Say you have a click […]

JQuery Ajax post all fileds values example

Basic usage of .ajax would look something like this: HTML:

JavaScript:

PHP (i.e. form.php):

Note: Always sanitize posted data, to prevent injections and other malicious code. You could also use the shorthand .post in place of .ajax in the above JavaScript code:

Note: While the above JavaScript will work in jQuery […]

JQuery PHP MYSQL login panel example

View demo click here Download demo This is a cool simple login / registration system. It will give you the ability to easily create a member-only area on your site and provide an easy registration process. It is going to be PHP driven and store all the registrations into a MySQL database. To add the […]

, ,

Ajax Jquery and PHP contact form example

View demo click here Download demo

We use the $_SESSION array to populate the values of the input fields. This is done to insure that the data is not lost during page redirects, which occur when the form is submitted to submit.php during the regular form submit. Another important aspect are the classes assigned […]

JQuery gallery with pop up and next button

View demo click here Download demo PHP The idea is simple – our PHP back-end is going to scan a folder that we’ve set up with our gallery images, and turn it into a fancy CSS & jQuery gallery. The great thing about this strategy is that it is incredibly easy to set up a […]

Previous Posts