How to format date of your jquery-ui calender plugin

Jquery plugin is more popular and most of the people like and they use the jquery ui calender plugin for the input box for date. but there are some problem which some people use date time  such as yyyy-mm-dd, yyyy/mm/dd ,ect.  so when user input date to the database there will be different and various type of date and It will be problem in some searching or using timestamp  value and it will not also be a uniform date time. I will show some formatting for jquery ui calender plugin and it will be uniform for all date field and date input.

$( “#input_date” ).datepicker({ dateFormat: ‘yy-mm-dd’ } );

or

$( “#input_date” ).datepicker({ dateFormat: ‘yy/mm/dd’ } );

you can use the format as you want . I just only show how to format for the jquery ui calender plugin. Now you don’t need to worry about user input date format. they will add using the calendar and  date format will also will be the same. you can also see  how to add jquery ui calender. It is easy to setup and easy to use. Thanks for reading this post . if you have any comment or feedback, please leave it by comment.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
Comments

How to limit Blog post in WordPress

WordPress is a popular and easy to use CMS program in the world but If  you are new or beginner of the WordPress you will be some difficult in some configuration. for me , I don’t like 10 post per page for the default WordPress setting. so I find how to set limit the Blog post in the web and I found some useful configuration and easy to change . Here it is…

1) Go to login to  the admin pannel

2) There is a Settings on the left side

3) Mouse over on the Setting , there will show 7 sub menu and click on the reading sub menu.

4) you will see Blog pages show at most text and change number next to it. then you can check it in front page it, will change or not

Then You will be easily configure how to change blog post on WordPress. Thanks  for reading this post.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
Comments

How to add google map custom marker in the google map

This one is nearly the same with how to add google map but some addition is that we need to declare icon variable and icon path. then we have to add that icon variable to the marker option.

1)  Declare google map latitude and longtitude

var gmapLatlng = new google.maps.LatLng(16.799282,96.149597);

2) Add google map option  and assign the google map longtitude and latitude to the google map option and choose google map type aslo.

var gmapOptions = {
zoom: 4,
center: gmapLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
}

3) Declare javascript variable and get the document id where you want to add such as div  and add google map option which you already create step 2

var map = new google.maps.Map(document.getElementById(“map_canvas”), gmapOptions);

4) This step is additional task for adding custom icon for the google map and declare custom icon variable and icon image path and image name.

var image = ‘path of image/image.png’;

5) Create marker option

var marker = new google.maps.Marker({
position: gmapLatlng,
title:”GMap Example”,
icon: image
});

6) Finally, Add the Marker to the Map

marker.setMap(map);

Now you can add custom image icon and you can download some google map icon  such as restaurant , shop , pagoda and many other. Thanks for reading this post and I am welcome for the some positive and some helpful comment.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
Comments

How To Add Marker to Google Map

Map is some popular for web technology now a day and some people use the map for their company location or some place display in the map.  Google map is a popular and easy to  use application. I had already post how to add google map on the website and you can check it here  if you interested to add and you are new to the google map . I will explain how to Marker which show some icon such as pagoda, restaurant or some type of icon and you can download some google map icon in the google map,   on the google map.

1)  Declare google map latitude and longtitude

var gmapLatlng = new google.maps.LatLng(16.799282,96.149597);

2) Add google map option  and assign the google map longtitude and latitude to the google map option and choose google map type aslo.

var gmapOptions = {
zoom: 4,
center: gmapLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
}

3) Declare javascript variable and get the document id where you want to add such as div  and add google map option which you already create step 2

var map = new google.maps.Map(document.getElementById(“map_canvas”), gmapOptions);

4) Create marker option

var marker = new google.maps.Marker({
position: gmapLatlng,
title:”GMap Example”
});

5) Finally, Add the Marker to the Map

marker.setMap(map);

After all step google map marker. This post is only for the google map default marker and you will see google map default marker in your google map after you all setup and I will write for next post for  how to add custom marker icon to the google map  . Thanks for reading.  I am welcome and please send feedback or some comment for your option.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
Comments

How to use Jquery Ajax in the php file.

I think some programmer will already know about this and some may be expert about this one but for the beginner , they will some complicated . I will explain step by step.

1) download jquery from jquery website and place some where in your web directory

2) add the following script between header script and replace jquery path with your jquery path

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

3) Add the following script in some where of your php file and it will start working after all the document is ready because I use the document.ready function  and create one file to make server-side process . if you want to pass data , you can use data property and you can select which type you want top pass such as $_GET or $_POST

<script>

$(document).ready(function() {

$.ajax({
url: “ajax.php”,
type: “POST”,
data: {id : menuId},

success: function(){

}
});
});
</script>

Then U can start ajax process and this is the basic knowledge of the ajax and ajax is some complicated if you don’t know properly but if you know well , it is not much difficult. if you have some difficulty debug , you can use chrome browser debug tool or for firefox , you can use the firebug for debug and trace. hopefully, this article will give u some knowledge and Thanks u for reading

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
Comments

Switch to our mobile site