Category Archives: jquery Downloads

Ajax,Jquery and PHP Availaibility Check During registration

Using Only PHP , checking the username is impossible because its takes a lot of time to go to server then back to page. The thing here is page refresh. So i have used here the ajax.This type of example can be seen during sign up, user registration and so on.
Start:

Available:

Not Available:

Every Availability check is done on keypress event.This application is developed using php,ajax and jquery.

Click here to download the source code

JQUERY length(empty) check -Form validation

This tutorial will show you how to validate the form . It simply checks whether the form elements like text, radio button i.e. the input type of the form are empty or not.
Step1: include the jquery file into your file
<script src=”js/jquery.js” type=”text/javascript”></script>

Step 2:Create a style(css) class .error in the header section
<!–
.error{
color:#F00;
background-color:#FF0;
}
–>?

How the Validation is done:

Here validation is done on blur event. On leaving the textbox if the textbox is empty then the class error is called.

Before length check:

After:(if left empty)

Here Goes the actual code:

<script type=”text/javascript” src=”js/jquery.js”></script>
<script>

$(function(){
$(‘:input’).blur(function() {
if ($(this).val().length == 0) {
$(this).addClass(‘error’);
}
});
$(‘:input’).focus(function() {
$(this)
.removeClass(‘error’)
.next(‘span’)
.remove();
});
});
</script>
<style>
}
.error{
color:#F00;
background-color:#FF0;

}
</style>
<form>
<input type=”text” name=”name”>
<br/>
<input type=”submit” name=”submit” value=”submit”>

</form>

ajax,php and jquery search like facebook

This example demonstrate the search system from the database like you search in the facebook. The records are searched on key press event.
Search with ajax, jquery and php like facebook Download Source Code

Jquery pop up on site load

when you first open your site instead of  the main page i.e the new transparent layer will be get displayed with the close button. When you click on the close button , you will have access over the main site.
jquery popup on startup Down load Source Code