Java Script Tutorial

Java Script Tutorial

Java Script is one of the most useful web languages, like CGI it allows the user to interact with the page more and for the page to do more. Java Script works in a normal HTML page and does not require much modification to work. This tutorial will mainly focus on how to use existing java scripts, but a little of it will talk about making your own script. Remember to check out our script center.


First off, you will need to know about the versions of Java Script and which ones work with each browser.


  • In this script, http://www.yourwebsite.com/yourpop up.html is the location of the pop up window, it is followed by several variables. Width and height define how big the window is. statusbar=yes/no/1 makes a status bar where the url is displayed. Toolbar=yes/no is the back, reload and stop bar. Scrolling=auto/no/yes turns scrolling on or off. There are many other variables that can be added, simply try something and see if it works.
    Another commonly used script is Get Rid of Frames automatically. This script makes your site automatically remove it's self from any frames it may be in, and it works much better then the meta tag version!

    Where you want the link to be, add this code:
    link

    This script requires very few variables to be changed, just for the framenames to be added and for the urls for the links to be changed. That's all there is to it, enjoy!


    Another script that people often look for is one that will write a text file or a particular java script to a web page. We have made one, and one that allows you to edit the text file very simply, with a single upload. Here it is.

    In your filename.html put your code Then make a file named myscript.js (make sure u have the .js otherwise it wont work) In this file, put the rest of the script like you would normally do. For instance a script that writes to web page would be this:





    This part of the tutorial is about common variables and coding in java script. This will not teach you how to completely make your own java script, just how to edit them.

    If - this statement is used to open an idea, if this is true or false, do this.
    = is equals, != equals not, as plain as that.
    { is open function, } is close function
    //comments here an more there
    closes it.
    function() starts a function.

    This part of the tutorial is about common variables and coding in java script. This will not teach you how to completely make your own java script, just how to edit them.

    If - this statement is used to open an idea, if this is true or false, do this.
    = is equals, != equals not, as plain as that.
    { is open function, } is close function
    //comments here an more there
    closes it.
    function() starts a function.

    There are many more commands, but they mainly deal with individual parts of scripts and types of scripts. Try looking through more of our sample scripts to see how they work.

    Mouse Over commands are very commonly used and very important for many people. We have included a few of them for your use along with an explanation of how to use them.


    This last script loads pages based on a user's resolution. This is very important because different resolutions change how the page is viewed and how it looks. This script is VERY easy to setup, simply put it on it's own page and change the variables!.




    For this script, simply change the variables for the url to load. index1.html beging for 640x480 resolution, index2.html for 800x600 and index3.html for 1024x768. That's all the scripts on this page. Remember to check out our code center for java script downloads and more!

    No comments: