|
C Experiments:
![]()
Text Processing
![]()
Experiment No. 1
![]() |
C Display of HTML and Text Files, 1999-05-12:
In this experiment, we develop a C cgi program to combine several HTML and Text files and display them as a single page on the web.
We begin by writing a File Selection HTML Page to allow the user to choose any one of the 232 KJV Bible files to be displayed.
The user can already display these files as text pages but the results are not very satisfying because there is no formatting and the text runs off the right side of the page, i.e. the user has to scroll to see all of it.
Our C cgi program will display a Header File (HTML) containing formatting statements and layout control JavaScripts. Then it will display a Title File (HTML). Then it will display the user-selected KJV Bible (Text) File as HTML. And, finally, it will display a Footer File (HTML) to close the web page.
Examine the Source for the HTML Files:
![]()
![]()
Header File (initially displays as HTML - click on VIEW|SOURCE)
![]()
![]()
Title File
![]()
![]()
Footer File
Examine the Source for the C cgi Program:
![]()
![]()
kjvSelect.cgi
Go to the File Selection HTML Page.
HOME