iLTC Home
Bookmark iLTC!

Categories

Perl
  • Perl Tutorials Beginners

  • Javascript
  • Javascript Tutorials
  • Javascript Tutorials Beginners

  • HTML
  • HTML Tutorials

  • Command Line
  • Command Line Tutorials

  • How Tos
  • Other Tips and Tricks



  • $koko =~ s/\./:)/g;
    1721517

    iLoveTheCode.com

    Javascript SetTimeout

    NOTE: If you have pop-ups blocked, the code below won't work, but luckily, the setTimeout tutorial works either way.

    function yup() {
    setTimeout("window.open('http://google.com')", 3000);
    }

    <body onLoad=yup()>

    -We create a function and name it yup because we like the name yup.
    -We call Javascript's built-in setTimeout method which takes two arguments.
    ---Our first argument is what we want to happen. (Open a window and go to google.)
    ---Our second argument is how long in milliseconds should the browser wait before executing our first argument. (example: 3000 is 3 seconds.)
    -We call our yup function in the HTML body tag with Javascript onLoad.


    NOTE: Since we called Javascript's built-in window.open method, which gets an argument too, we enclosed our entire first argument in double quotes, and then put our google URL in single quotes.



    Free Copy and Paste Javascript Code:

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

    function yup() {
    setTimeout("window.open('http://google.com')", 3000);
    }

    -->
    </script>

    <body onLoad=yup()>

    Resources:
    Javascript Create a Function
    Javascript Call a Function
    HTML Tutorials
    Javascript Open Window
    Javascript onLoad




    Previous Article: Javascript Concat Use Concat to Join Two Arrays in Javascript
    Next Article: Javascript Status Bar






    Search iLTC w/ Google




    Recent Articles

  • HTML Font Code
  • Javascript and CSS - Easy Pop Up Help Balloons
  • Use OnMouseOver in Javascript
  • Use onMouseOut in Javascript
  • Use innerHTML to Change Text on a Page
  • Renaming a File with Perl's RENAME Function
  • PRINT to Browser with document.write Command in Javascript
  • Passing an Argument or Variable to a Javascript
  • Opening an Alert Box in Javascript
  • Opening a REMOTE WINDOW in Javascript
  • OPEN and WRITE a Data File in Perl
  • OPEN and READ a Data File in Perl
  • Mimic Typing from a Textfield in a Textarea with Javascript
  • Javascript Reset Form








  • Perl Programming - Javascript Programming - HTML Code - Mac Unix Command Line - Maybe Some PHP - Free Scripts - ILoveTheCode
    All Content © 2006-2009 iLoveTheCode.com


    Contact Chris | About this Site


    1721245
    Counter by iLoveTheCode.com


    Last Modified: Saturday, 10-Jan-2009 05:40:24 EST



    Hosted as well :)
    Home-brewed logo - 1997