Working with HTML5 local Storage prototype

After a long gap I am plan to post an article in Html5 local Storage, what is the use of local Storage and which way it will be helpful to storing the data. HTML5 has a feature to store & retrieve data from the client user browser without affecting website performance and not to round-trip the server. Previously […]

How to access global variable in JavaScript

Accessing global variable in JavaScript, what is global variable where it used. Global variable is accessible everywhere in the script, for example if you want to access variable which defined in top. <script language="javascript"> // declaring global variable var myVariable = 1; Its accessible inside the function or outside the function as variable. there is […]

Accessing querystring value using JavaScript

When I was working with server-side script, I have the question its possible to access query-string values from JavaScript. But which way it will be identify the each parameters from the query-string. In JavaScript we have method “window.location.href” which will read url and query-string. We will create two html file, first one will have text-box and submit, […]

Changing javascript date/time to server date/time using php

Simple way to change JavaScript date/time to server date/time, first we are going to pass php date format into javascript date function. <script language="javascript"> var serverDate = new Date("<?php echo date("Y/m/d");?>"); var systemDate = new Date(); function currentDateTime() { document.getElementById("divCurrentSYSTEMDate").innerHTML = systemDate; document.getElementById("divCurrentSERVERDate").innerHTML = serverDate; } </script>

hide and show div tag using jquery and javascript

first we are going to include jquery library for show and hide the div tag <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> we are going to show and hide the div tag using jquery function <script language="javascript"> $(document).ready(function() { $("#showID").click(function() { $("#divMsg").show(1000);}); $("#hideID").click(function() { $("#divMsg").hide(1000);}); }); </script> creating two link to show and hide based on the link ids <div><a […]