The establishment of Web applications using Javascript

Related Tags:

  Abstract: The author of this article in the WINDOWS NT system, the installation of the server-side NETSCAPE development environment Livewire 2.0, in this environment, the use of javaScript scripting language, the production is dynamic, interactive Web pages and the preparation of servers and customers procedures for the Web method. 

  With the Internet / Intranet applications universal, and more and more users in the design used on Client / Server architecture, and to establish their own Internet / Intranet applications.    Client responsible for the request to the Web server, and from the Web server is responsible for receiving and interpreting show hypertext.    To generate dynamic, interactive Web pages, it must pass common gateway interface (CGI), the proceedings may be CGI Perl, C, JavaScript, preparation, the current popular method is to use Java or JavaScript. 
  I. Introduction JavaScript JavaScript is a scripting language, because it benefits applicable to client applications, but also for the server-side application development.    For example, in the client it can be used to write Web browser programs, and in the server, it can be used to deal with a Web browser to prepare the information submitted, and the corresponding update the browser displays the Web server process.    Although JavaScript can meet some server side programming needs, but also need some server side procedures to support more advanced Web applications.    For example, access the database or special treatment.    To this end, Netscape, a company specialising in the development of integrated JavaScript server environment Livewire. 
  Second, Livewire brief Livewire is a WEB application development environment, Windows NT4.0 system installed Netscape Fast track could use it.    Livewire used to develop browser and the Web server side applications.    Thus the server may need to replace the original CGI program.    Livewire Netscape and Netscape server can be downloaded from the Web site http://home.Netscape.com (30-day free trial). 
  Third, the server side JavaScript programming the server side JavaScript procedure was developed by Livewire, the specific programming steps are as follows: 
  1, with the client side JavaScript and html server side JavaScript embedded in the source file to create. 
  2, the compiler will use Livewire source files compiled. WEB document. 
  JavaScript in the server side and client side JavaScript distinction, provides four kinds of object, request, client, project and the server. 
  Below, we will be able to develop some procedure, first of all, a simple example to highlight the development process: 

  Students. Htm providing students with the registration form to enable students to complete. 
  Process.htm handle students with the students. Htm registration form input data, the client and server side JavaScript together that students registration forms, and submitted to the display.htm. 
  Display.htm that students. Process.htm htm, and the data collected, both on the client properties. 
  Record.htm students registration forms will be included in the document student.txt. 

  Procedures attached: 
  Students. Htm 
<html>
<head>
  <Meta http-equiv = "Content-Type" 
  Content = "text / html; gb_2312-80 charset ="> 
  <meta Name="GENERATOR" content="Microsoft FrontPage Express 2.0"> 
  <title> Pupils registered </ title> 
  </ Head> 
  <p Align="center"> <font size="5"> Welcome to computer center </ font> </ p> 
  <form Action="process.htm"> 
  </ Form> 
  <p> <font Color="#00FF40" size="4"> type of study: </ font> </ p> 
  <form Method="POST"> 
  <p> <input Type="text" size="13" name="T1"> <input 
  Type = "submit" value = "Continue"> </ p> 
  </ Form> 
  </ Body> 
  </ Html> 

Process.htm
<html>
<head>
  <Meta http-equiv = "Content-Type" 
  Content = "text / html; gb_2312-80 charset ="> 
  <title> </ Title> 
  </ Head> 
  <body Bgcolor="#808080"> 
<SERVER>
  <p> Client.t1 = request.t1 
  Write ( "<script language="javaScript">") 
  Write ( "</ SCRIPT>") 
  </ SERVER> 
  </ Body> 
  </ Html> 
  </ Script> </ p> 
  <p Align="center"> <font color="#FFFF00" size="5"> pupils registered </ font> </ p> 
  <form Action="display.htm"> 
  Name <input type = "text" size = "14" name = "Name"> 

  Sex <input type = "text" size = "7" name = "Sex"> 

  Date of birth <input type = "text" size = "30" name = "Birth"> 

  Home address <input type = "text" size = "11" name = "Address"> 

  Postcode <input type = "text" size = "11" name = "Zip"> 

  Phone <input type = "text" size = "11" name = "Tel"> 

  </ P> 
  </ Form> 
  </ Body> 
  </ Html> 

  Display.htm 
<html>
<head>
  <Meta http-equiv = "Content-Type" 
  Content = "text / html; gb_2312-80 charset ="> 
  <meta Name="GENERATOR" content="Microsoft FrontPage Express 2.0"> 
  <title> Client. </ Title> 
  </ Head> 
  <body Bgcolor="#FFFFFF"> 
<SERVER>
  <p> Client.Name = request.Name 
  Client.Sex = request.Sex 
  Client.Birth = request.Birth 
  Client.Address = request.Address 
  Client.Zip = request.Zip 
  Client.Tel = request.Tel </ p> 
  <p> Write (client.Name " 
")
  Write (client.Birth " 
")
  Write (client.Address " 
")
  Write (client.Zip " 
")
  Write (client.Tel " 
")
  </ SERVER> </ p> 
  <form Action="finish.htm"> 
  <p> <input Type="submit" value="继续"> </ p> 
  </ Form> 
  </ Body> 
  </ Html> 


  Record.htm 
<html>
<head>
  <Meta http-equiv = "Content-Type" 
  Content = "text / html; gb_2312-80 charset ="> 
  <meta Name="GENERATOR" content="Microsoft FrontPage Express 2.0"> 
  <title> F = </ title> 
  </ Head> 

  <body Bgcolor="#FFFFFF"> 
<SERVER>
  <p> F = new file ( "student.txt") 
  F.open ( "a") 
  F.writeln (client.Name) 
  F.writeln (client.Sex) 
  F.writeln (client.Birth) 
  F.writeln (client.Address) 
  F.writeln (client.Zip) 
  F.writeln (client.Tel) 
  F.close () </ p> 
  </ SERVER> </ body> 
  </ Html> 
  Author: Li Bing Address: armed police in Xi'an Institute of Technology Center Address: 710086 

Related articles:

WEB2.0 standards Guide: 10th day highly adaptive
  If we want the final layout of the three Canadian delegation footer and let copyright such information.    Alignment must be met at the bottom of the three issues.    In the table layout, we used the small form nested forms, can be easily justified 3; using div layout, and...
Flash cards produced innovative methods On
  With the popular Flash animation network, a new way of festive greetings to the birth - this is Flash cards.    With the traditional electronic greeting cards not only in comparison to its economic environment, through quick transmission network, and Qingguangxiaoguan alarming, prod...
Improve code performance on skills - to create 1,000 firms form as an example
  Microsoft's development cycle is a very important adjustment of product performance.    Property developers should be adjusted is a key part of the carefully.    Through years of development, the industry on how to optimize the performance Win32 has been a lot of unde...
Head Must see: a rapid increase in Web traffic three unique skill
  And the establishment of a directory of links related to the themes of    And the area where your site links to related sites directory can increase your site traffic.    However, these web sites, it is not your direct competitors.    Suppose you operate a pet ...
You understand the current web design trends? To see
  First from the original: http://www.ontoinfo.com/2006/09/13/current-trends-in-web-design/ author of the excellent design will now summarize the eight kinds of styles, the original proposal to see if Author intercepted by the graphics, for example.    1.Web of desktop   ...