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