Read data from json using jquery parse

var jsondata = JSON.stringify(data);

var json = $.parseJSON(jsondata);
//alert(k+” : “+ v);


Encrypt password on client side and Decrypt on server side using jquery and php


function encrypt()
var key = CryptoJS.enc.Hex.parse(“0123456789abcdef0123456789abcdef”);
var iv = CryptoJS.enc.Hex.parse(“abcdef9876543210abcdef9876543210″);

var pass=document.getElementById(‘new_pwd’).value;
var hide=document.getElementById(‘hide’).value;
document.getElementById(‘err’).innerHTML=’Error:Password is missing’;
return false;
document.getElementById(“hide”).value = document.getElementById(“new_pwd”).value;
//var hash = CryptoJS.MD5(pass);

var hash = CryptoJS.AES.encrypt(pass, key, {iv:iv});

return true;


$key = pack(“H*”, “0123456789abcdef0123456789abcdef”);
$iv = pack(“H*”, “abcdef9876543210abcdef9876543210”);
$encrypted = base64_decode($this->input->post(‘new_pwd’));
$shown = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $encrypted, MCRYPT_MODE_CBC, $iv);
echo $shown;

Is used to bring the opened window to the top of the current page , even if you click back an parent page an again trying to open the same opened page.

In Firefox will open the page to top but when you back and forth from previous page it will hide in the background for solving this we can use .focus() to the window open method.