Bangladeshi Softwares
Home - Download - Codes & Tutorials - Bangla IT Bibhag - Mobile - About Me

 


Disturbing a button!


Step-1:

Let's disturb a button. Assume that it is sleeping and we want disturb it by clicking on it. It is not a normal button, so it will tell us something on every single click. Open your favorite text editor and type the code below:


<head>

<script language="javascript" type="text/javascript">
<!--

/*
 * Author: Ahsanul Haque Shovon
 * Email: ahsanul.haque.shovon@gmail.com / ahsanul_haque_shovon@yahoo.com
 * Web: http://shovon.110mb.com
 */

cnt = 0;
sr = new Array
     (
       "Please don\'t disturb me, Thank you.",
       "Don\'t click me again.",
       "Hey look, I am warning you. Okay?",
       "\'nuff!",
       "If you click me again, I\'ll call my brother."
     );

function message()
{
  if(cnt < 5)
  {
    window.alert(sr[cnt]);
  }

  if(cnt >= 5)
  {
    document.open();
    document.write('<img src="./brother.gif" width="724" height="444"
                    border="0">');
    document.close();
  }

  cnt++;
}

//-->
</script>

</head>

<body>

<form>
 <input type="button" value="Don't Disturb Me!" onclick="message();"
 style="background-color:#DD0000; font-size:18px; font-weight:bold;
 color:#FFFFFF;">
</form>

</body>


Step-2:
Now save the file as 'any_name_you_like.html' and open it with your web browser (do not forget to download the image named 'brother.gif').



Download the 'brother.gif' image used in the above code snippet (right click and save target as):




Other Helpful Resources:
http://www.scriptsearch.com
http://www.programmersheaven.com



 



©Ahsanul Haque Shovon
All rights reserved