Search - Articles - Dev Forums - Favorites - Member Login
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009


Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 

Build the right apps the right way with powerful development tools.
Visual Studio 2010. Learn more...
How to open New Window with different Window Properties on Arrow keys using JavaScript in ASP.Net (Part 13)

Author: DevASP
Download Source Code : 404_OpenWindow.zip

In this article you will learn that how you can set window properites on pressing keys. this is very useful for the programmers.

Add the following code in the body tag of your page:

<body MS_POSITIONING="GridLayout">

<form id="Form1" method="post" runat="server">

<SCRIPT language=JavaScript>

function document.onkeydown()

{

if (window.event.keyCode==40)

window.open("http://www.devasp.net/","HLP1","toolbar=0,status=0, _ directories=0,scrollbars=1,resizable=1,menubar=no,left=0,top=0");

if (window.event.keyCode==39)

window.open("http://www.devasp.com/","HLP1","toolbar=1,status=0,directories=0, _ scrollbars=1,resizable=1,menubar=no,left=0,top=20");

if (window.event.keyCode==38)

window.open("http://www.devasp.com/articles/","HLP1","toolbar=1,status=0, _ directories=1,scrollbars=1,resizable=1,menubar=no,left=0,top=20");

if (window.event.keyCode==37)

window.open("http://www.devasp.net/articles/","HLP1","toolbar=1,status=1,directories=1, _ scrollbars=0,resizable=1,menubar=no,left=0,top=20");

}

</script>

</form>

</body>

Now there are many different settings of the window in some of next part i explain you that how you can handle new window by its parent.

   
Add Article Comment:
Name :
Email Address :
   
Comments :
 
   
<< How to show time of different countries using JavaScript in ASP.Net (Part 12)

Disclaimer - Privacy
© 2002-2010 DevASP.net