When you open a file, the current position depends


When you open a file, the current position depends on the mode you use to open it.
Generally it starts at the beginning of a file, except for modes a+ and a where data is appended at the end of an existing file. For empty or new files, the end of the file and the beginning of the file are the same.

The setPosition method changes or sets the current position


The setPosition method changes or sets the current position. You can change the position relative to the beginning of the file, relative to the end of the file, or relative to the current position.
This is called the reference, and is an optional parameter. The default reference is the beginning of the file. The syntax for the setPosition method is
fileObj.setPosition(position [,reference])

In any multi-user environment you must deal with cases of simultaneous access


In any multi-user environment you must deal with cases of simultaneous access. On file servers, you lock a file while you are using it. You unlock it when you are finished with the operation. The other user must wait for you to finish.
If you do not lock files, the data can be corrupted. A simple example is with two people editing a document. If both are editing at the same time, then one saves his changes before the other. The problem is that the first set of changes are over written by the second.

Undoubtedly with your active interest in building Web sites


Undoubtedly with your active interest in building Web sites, you have dealt with Common Gateway Interface (CGI) scripts.
Prior to JavaScript, this was the primary means of creating interactive applications. Libraries of CGI scripts include counters, e-mailers, message boards, and many other functions.

Like any other Web site, a browser requests a Web page to access a LiveWire applicati


Like any other Web site, a browser requests a Web page to access a LiveWire application. The browser can request any of the pages within an application. The server sees the request like any other request, though it is handled differently.
In turn, the browser is not concerned if the HTML is a static page or from a dynamic LiveWire application. The form of the URL is as follows:

http://server.domain/application/page.html

The SERVER tag contains JavaScript that either executes a statement


The SERVER tag contains JavaScript that either executes a statement or produces HTML with the write functionthat either executes a statement or produces HTML with the write function
A JavaScript statement can be a rather simple routine or a more complex set of functions.

When interactivity was only done with a CGI


When interactivity was only done with a CGI, all of the processing was done on the server.
Because JavaScript can run on both the server and the browser, writing a successful application requires you to properly allocate the processing between the two.

In making your application come alive, the server and browser must exchange


In making your application come alive, server and browser must exchange information. The client, or browser, typically sends user responses.
These can first be “polished” by JavaScript routines on the browser side. The server in turn sends data back to the browser as HTML pages.

User responses are submitted just as you currently handle forms


User responses are submitted just as you currently handle forms. The user completes the form and clicks the submit button.
After it,the data from the radio buttons, checkboxes, textboxes, and textarea are sent to the server. The server then places this data into the request object. Each element of the form has a corresponding property.

Usually a server only returns a static page in response to a browser request


Usually a server only returns a static page in response to a browser request. In LiveWire, the response is still a page, but the contents of the page vary.
User input can result in changes to default form values, new values of hidden form elements, or direct substitutions.