Forum Moderators: open

Message Too Old, No Replies

What exactly is a script?

I don't understand please help

         

cmeg88

12:50 am on Mar 20, 2002 (gmt 0)



I don't understand what a script is, please help me - any info is greatly appreciated.

<Edited for all caps - easier to read ~Marcia>

(edited by: Marcia at 1:33 am (utc) on Mar. 20, 2002)

Duckula

1:25 am on Mar 20, 2002 (gmt 0)

10+ Year Member



A script is simply an embedded piece of code inside (for example) your html, but can exist by itself too.

The difference between the 'markup' (that is the M in HTML) and a script is that the script can be executed by an interpreter and perform actions at runtime.

Of course, if you didn't know you didn't need to know.

What's up with the all caps? (thanks Marcia)

brotherhood of LAN

1:35 am on Mar 20, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



yeah I noticed he had to shout it :)

The easiest way I got to understand scripts is purely remembering them as miniature programs, sounds easy enough to get your head round without getting heavy on the jargon :)

mikegram

1:51 am on Mar 20, 2002 (gmt 0)

10+ Year Member



I'm not really sure what you're looking for here, but for what is worth, a script or scripting language is usually classified as one that is executed by an interpreter. This is contrasted with a compiled program which is its own executable(e.g. C++, Visual Basic). The dicotomy doesn't really hold up because some languages such as Java are both compiled and interpreted.

If you want to give scripting a shot, you probably want to look at using JavaScript(different from Java) embedded in your HTML code. You can find a lot of scripts available for use on the web. Just do search for JavaScript.

(edited by: mikegram at 1:52 am (utc) on Mar. 20, 2002)

Marcia

1:51 am on Mar 20, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello cmeg88, welcome to WmW.

A script can be thought of as a program that does something. There are two types with web sites:

1. Server side scripts, that are executed on the server or host computer, and
2. Client-side scripts, which are processed by the browser.

An example of client (or browser) side scipting is Javascript, often used for the mouseovers, where the image changes when the mouse is passed over it.

An example of a server side scipt would be a Perl script such as formmail.pl which is referenced by special tags within the HTML of a page and submitted by the person filling out a form on a web page clicking on a "submit" button. The script, or program, is then activated and the contents of the form are sent to whoever is designated to receive it in the HTML code.

The information is entered on the web page, and the processing is done by the Perl program on the host computer. The two are connected with each other through the use of CGI - the Common Gateway Interface.

Probably the first you'll use is a simple form to email script; it's also the most commonly used, so it'll be the best one for you to start with. You don't have to know the programming language itself, all you'll need is a basic understanding to read the instructions.

Hope with what we've all explained this is clear enough, please don't hesitate to ask if you have any more questions.