Ning Ma blog

my technology tips

December, 2011

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 […]

A simple site design by PHP and AJAX

View demo click here Download demo Home page

JQUERY The .ready() method is generally incompatible with the attribute. If load must be used, either do not use .ready() or use jQuery’s .load() method to attach load event handlers to the window or to more specific items, like images. Note how, on line 3, […]

Twitter and weibo example by PHP JQuery and AJAX

View demo click here Download demo Creating the DB If you’d like to run a working demo on your own site, you will have to create a MySQL table where all your tweets are going to be stored. You can run the following SQL code through phpMyAdmin (the code is also available in table.sql in […]

Nice register form example with JQuery AJAX and PHP

View demo click here Download demo CSS



Birthday html

Birthday PHP function

join(value,array) join function is use for join all array value to one, and separated by “value” array_reverse() — Return an array with elements in reverse order The last two styles are #loading and #error, which select […]

Click button change div contents by Ajax


XMLhttpRequest Beful using Ajax, we need create an XMLhttpRequest object. All modern browsers (IE7+, Firefox, Chrome, Safari, and Opera) have a built-in XMLHttpRequest object. Syntax for creating an XMLHttpRequest object: variable=new XMLHttpRequest(); Old versions of Internet Explorer (IE5 and IE6) uses an ActiveX Object: variable=new ActiveXObject(“Microsoft.XMLHTTP”); *better use try catch to avoid […]

how Ajax work-logical drawing

POP up a message when leave the page

POP a message when open new page

Javascript check username and password validation

Use the “password” input type Instead of

you should always use

as this lets the browser (and the user) know that the contents of that field need to be secured. Your password won’t appear on the screen as you type and most browsers also won’t ‘remember’ the values entered in password fields as […]

Previous Posts