Search - Articles
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
 

Slide Your browser up, down, right, left Using JavaScript

Author: DevASP
Download Source Code : 556_SlideScreen.zip

This article is about how you can slides the screen up then down and then right and left. This can be used to catch the attention of your user.

  • Steps you will do. 
  • Start visual studio and create a new web application. 
  • Open the HTML design of your page and before closing the head tag add the following JavaScript function.

 

<SCRIPT LANGUAGE="JavaScript">

 

for (t = 2; t > 0; t--) {

for (x = 20; x > 0; x--) {

for (y = 10; y > 0; y--) {

parent.moveBy(0,-x);

  }

}

for (x = 20; x > 0; x--) {

for (y = 10; y > 0; y--) {

parent.moveBy(0,x);

  }

}

for (x = 20; x > 0; x--) {

for (y = 10; y > 0; y--) {

parent.moveBy(x,0);

  }

}

for (x = 20; x > 0; x--) {

for (y = 10; y > 0; y--) {

parent.moveBy(-x,0);

    }

  }

}

 

</ SCRIPT >

 

Now add the following HTML code which will design your web page and call the above JavaScript function to slide the window.

  

<body MS_POSITIONING="GridLayout" bgcolor=#009999>

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

    <center>

      <H4>Dont forget to visit www.devasp.com</H4>

      <a href="http://www.devasp.com">Devasp Team</a>

      </center>

    </form>

  </body>

 

   
Add Article Comment:
Name :
Email Address :
   
Comments :
 
   
<< Shake the browser window using JavaScript

Disclaimer - Privacy
© 2002-2017 DevASP.net