Wayne State University
College of Lifelong Learning
Interdisciplinary Studies Program, Fall, 1999
http://www.cll.wayne.edu/isp/drbowen/internet
Instructor email: d.r.bowen@wayne.edu
Instructor tel (WSU) (313) 577-1498 / (Home) (248) 549-8518
eCommerce: Using the Web to Find and Service Customers
AGS 3360 Section 986 Call Number 99882
or ISP 5500 Section 982 Call Number 90569

Last updated: 11/17/99
Link back to course Welcome

iHTML
for AGS 3360: eCommerce

  1. When the SUBMIT button is clicked, here is what happens, in order
    1. Browser sends all content in form fields between <form ...> and </form> containing the button, to the web server
    2. The web server looks for the Gateway program, starts it and passes it the form information, and tells it where to leave its response
    3. The Gateway program
      1. Processes the information (what this means is up to the program developer)
      2. Prepares a response HTML page for the user
      3. Ends
    4. When the web server notices that the Gateway program has ended, it sends the program's response page back to the user
  2. iHTML
    1. .iht extension, named as the action, causes the iHTML preprocessor to process the file before the web server sends it to the user
    2. Notepad or Wordpad to insert iHTML tags
    3. Can still use FrontPage to prepare standard HTML parts, for example by Copy and Paste
      1. In order to get the HTML tags into Notepad or Wordpad, must copy from FrontPage in the HTML view
    4. An iHTML file (.iht extension) is a mixture of normal ASCII text, standard HTML tags, and special iHTML tags
      1. The file is "preprocessed" by iHTML before being sent to the user as the system response
      2. Text and HTML tags get passed through to user without change
      3. What happens to iHTML tags
        1. Some cause an action such as sending an email or saving information from the form to a database
        2. Some get replaced with information, such as information from a database or from the form
        3. None get passed through to the user (unless they are replaced)
  3. iHTML tags -- all start with i
    1. <!ihtml> as the first line - alerts iHTML to process the file
    2. :fieldname replaced with the value of fieldname, e.g.
      • html form file <input type=text name="FirstName">
      • user types in "John"
      • in .iht file, :FirstName replaced with John
      • Appears as regular text, sent by web server back to browser, displayed by browser
    3. Sending an email, including information from the form. Third column is comment only - do not include in tag.
      <imail address="recipient email address"
      [from="sender's email address"] [] indicate optional field
      [host="SMTP mail host name"] use "smtp.wayne.edu"
      [subject="subject of message"]
      [output="message if email is successful"] goes in response to user
      [replyto="reply email address']>
      Email message goes here. Can contain : variables.
      </imail>
    4. Inserting information into a database. Third column is comment only - do not include in tag.
      <iHTML dbname="DataSource Name" Use Team DSN
      sql="insert into tablename (list of fieldnames) Separate field names with commas
      values ('value1', 'value2', 'value3' ... 'lastvalue')" Values can also be colon variables from form
      FAILURE="Error: :i_error :i_errortext :i_sqlerrortext<br>"> Displays an error message if tag fails. Useful for debugging, but you don't want your users seeing this!

Example iHTML file

<!ihtml>
<!-- Inserting the Current Information into the Plan Table -->
<iHTML DBNAME="new_pw" 
SQL="Insert into Plan(StudentID, CoursePrefix, CourseNumber, SectionNumber, 
CallNumber, Credit, Grade, Semester, Year, Location, 
Department, Times, Day, Category, Transfer, DateEnt, PersonEnt, GenEd) 
values (':StudentID', ':CName', ':CNo', 
':SNo', ':Call', ':CCredit', ':CGrade', ':CSemester', 
':CYear', ':CLocation', ':CDepartment', ':CTime', 
':CDay', ':CCategory', ':CTransfer', ':CDateEnt', 
':CPersonEnt', ':CGen') " 
ESC="FALSE"
FAILURE="Error: :i_error :i_errortext :i_sqlerrortext<br>"> 
<!-- Display information on the Logout Page -->
<html>
<head>
</head>
<body bgcolor="#336699" link=red>
<font color="white" face="arial rounded mt bold"><strong>The information of
     <i>:FName </i> has been stored in the database and <br>an email has been
     sent to the Counsellor.</strong>
<br><br><br>
<font size="+1"><center>You have successfully Logged out of <br>
Plan of Work Page.<br>
<br><br>
<p align=left><font color="red">Warning! </font><font color="yellow">To
prevent others from viewing or using your information be sure to exit or close
your web browser. (Usually this is Netscape Navigator or Internet Explorer.)
</font></p>
</body></html><br>
<!-- Automatic Email generation -->
<iMAIL ADDRESS=":c_email" 
       FROM="webserver@cll.wayne.edu" 
       HOST="cll.wayne.edu" 
       SUBJECT="Plan of Work" >
:FName :LName (:StudentID) has updated on line plan of work.
</iMAIL>