Programming in almost language

This is the site where you may share your knowledge and experience to eachother..

  • Categories

  • LinkedIn

  • Tweet Me

  • My footsteps

  • Advertisements

Java script

Posted by Praveen Kumar on March 3, 2008

JavaScript Key Code

First try to get the key code whether its returning some code or not


Press any key to determine the javascript key code of that key. This is a simple script:

<script language=”JavaScript”>
document.onkeydown = checkKeycode
function checkKeycode(e) {
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
alert(“keycode: ” + keycode);

Auto Refresh page after clicking on close/submit button

<a href=”javascript:window.opener.location.reload();javascript:window.close();”>

<input type=”button” value=”Close” />


this will close popup after clicking save button of popup and refresh the parent form.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: