Journal for November 21, 2005

Compiled by Kimberly Barnaby

* Is this a CGI or an Interface?

 It's an interface, interaction between you and the machine/server. Interface can be written with javascript or vbscript, they're almost the same. For  a server program, we use the C or C++ languages, PERL, PHP, and visual basic. You can use any language.

<HTML>
<HEAD>
<TITLE>Test Button Events</TITLE>
</HEAD>
<BODY>
<FORM NAME="Form1">
   <INPUT TYPE="Button" NAME="Button1" VALUE="Click">
   <SCRIPT FOR="Button1" EVENT="onClick" LANGUAGE="VBScript">
      MsgBox "Button Pressed!"
   </SCRIPT>
</FORM>
</BODY>
</HTML>

* This is an example of a form that has an action in it (clicking a button).

* The next assignment was to do the interface on page 699-700; the database assignment is on page 701; and java database program is on 708.

* Script means small language.

* What does action mean in html code? Action means to put the name of the program there that you will be executing.

* "ebrahimi.cgi" means "ebrahimi.exe"; something will be executed by this piece of code.

<html>
<form action=cgi-bin/ebrahimi.cgi method="post">
First Name:<input type = text name= f size = 10><br>
Last Name:<input type = text name= f size = 10><br>
<input type = submit value = submit>
</form>
</html>

* There are two methods of transferring information: method = "post" and method = "get".

* Program on page 700 -book 2: This program is an example of a CGI form.

* What data needs to be sent from this form to the program? Name.

* A program has to get 2 things: variable name & the data. The variable name in this program is "f", meaning f will be sent so the program knows f = name.

* You talk to the form; form talks to the server/database; database is talking to the form; form is talking to you.\

* This is a weather form from yahoo.com:

<form name=w action="r/w8/*-http://weather.yahoo.com/search/weather2" onsubmit="return gw(this)">
<div id=wa></div>
<label for=zi class=np><span id=wg>Enter City or U.S. Zip Code</span></label>
<div>
<span id=z><input type=text id=zi name=p></span>
<span id=ws><input class=s2 type=submit value=Go></span>
</div>
<div class=wa></div>
<span class=wa><input type=checkbox id=we name=sv value=on checked> <label for=we>Save location on this page</label></span>
</form>

* http://finance.yahoo.com/q?s=sunw: s is the variable name for the stock; it was separated from q (possibly meaning quote) by a question mark. Sometimes values are separated also by ampersand sign (&&), which serves as a separator for the variables. For example, http://search.finance.yahoo.com/search?type=&s=george+soros  (the plus sign means a space)