<!DOCTYPE HTML PUBLIC "- //W3C //DTD HTML 4.0 Transitional //EN"><html><head>
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<link rel="SHORTCUT ICON" href="graphics/dss.ico">
<STYLE TYPE="text/css">
<!--
H1, H2, H3, H4, H5, H6 {font-family:"Arial"}
td {font-family:"Arial"}
td {font--size: 10pt}
td {font-weight: bold}
td {border-width: 2px}
table {border-color: #8D89C7}
body {font-family:"Arial"; font-size: 10pt; font-weight:bold}
p {font-family:"Arial"; font-size: 10pt; font-weight:bold}
-->
</STYLE>
<title>JavaScript Examples</title>
</head>
<body text="#000080" vlink="#000080" background="graphics/background2.gif" link="#000080">
<table bgcolor="#bde7b7" width="100%"><tbody><tr><td>
<center><table cellpadding="5" bgcolor="#bde7b7">
<tbody><tr>
<td><center><a href="http://www.umsl.edu/business/mis/">Information Systems</font></a></i></center></td>
<td width="45"></td>
<td><center><a href="http://www.umsl.edu/business/General_Business.html">College of Business Administration</a></i></center></td>
<td width="40"></td>
<td><center><a href="http://www.umsl.edu/">University of Missouri - St. Louis</a></i></center></td>
</tr>
</tbody></table></center></td></tr></tbody></table>
</font><h2><center>Sample JavaScript</font></center></h2>
<center>
<table width="90%" bgcolor="#bde7b7" border="2" cellpadding="15">
<tbody><tr>
<td width="100%">
<cfform name="addparticipants" action="addrecord.cfm" method="post" datasource="#d_oracle#" username="#u_oracle#" password="#p_oracle#" DEBUG>
<center><table cellpadding=5 border><tr><td>
<center>Please Complete the Following Form</center><p>
First Name: <cfinput type="text" NAME="FIRSTNAME" maxlength="50" size="30"/><p>
Last Name: <cfinput type="text" NAME="LASTNAME" LABEL="Last Name: " maxlength="50" size="30"/><p>
Department: <cfinput type="text" NAME="DEPT" maxlength="4" size="4"/><p>
Years with the Company: <cfinput type="text" NAME="YEAR" LABEL="Years with Company: " maxlength="4" size="4"/><br><p>
<p align="center"><cfinput NAME="submit" type="submit" value="Save"> <cfinput NAME="clear" type="reset" value="Clear">
</cfform>
|
<p><hr><p>
<img src="graphics/button2.jpg" width = 20> <a href="index.html">Return to Index</a>
</tr>
</tbody></table>
</center>
<p><hr><p>
<center>| <a href="http://www.umsl.edu/index.html">UM-St. Louis Home Page</a>
| <a href="http://www.umsl.edu/business/General_Business.html">College of
Business Page</a> | <a href="http://www.umsl.edu/business/mis/index.html">IS
Home Page</a> |</center>
<p><hr><p>
<small>
<script language="JavaScript">
// This automatically updates the last modified date for the page.
//
when = document.lastModified
document.write("This page was last modified on: " + when + "<br>")
//
// This automatically updates the location documentation on the page.
where = document.location
document.write("URL: " + where)
</script>
<br>Page Owner: <a href="http://www.umsl.edu/%7Esauter/">Professor Sauter</a>
(<a href="mailto:Vicki.Sauter@umsl.edu">Vicki.Sauter@umsl.edu</a>)<br>
</i>© Vicki L. Sauter. All rights reserved.
</body></html>
In addition, you need to create an additional file, "addrecord.cfm". That code is below.
<html>
<head>
<title>Cold Fusion Sample</title>
</head>
<body>
<cfquery name="add_participants" datasource="#d_oracle#" username="#u_oracle#" password="#p_oracle#" DEBUG>
INSERT INTO CLASS (LASTNAME, FIRSTNAME, DEPT, YEAR) VALUES ('#LASTNAME#', '#FIRSTNAME#', '#DEPT#','#YEAR#')
</cfquery>
<script>
open ("http://www.umsl.edu/~sauterv/help/javascript/samples/insert_complete.html")
</script>
|
</body>
</html>
In addition, you need to create the greeting page, "insert_complete.html". That code is below.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head>
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<link rel="SHORTCUT ICON" href="graphics/dss.ico">
<STYLE TYPE="text/css">
<!--
H1, H2, H3, H4, H5, H6 {font-family:"Arial"}
td {font-family:"Arial"}
td {font-size: 10pt}
td {font-weight: bold}
td {border-width: 2px}
table {border-color: #8D89C7}
body {font-family:"Arial"; font-size: 10pt; font-weight:bold}
p {font-family:"Arial"; font-size: 10pt; font-weight:bold}
-->
</STYLE>
<title>JavaScript Examples</title>
</head>
<body text="#000080" vlink="#000080" background="graphics/background2.gif" link="#000080">
<table bgcolor="#bde7b7" width="100%"><tbody><tr><td>
<center><table cellpadding="5" bgcolor="#bde7b7">
<tbody><tr>
<td><center><a href="http://www.umsl.edu/business/mis/">Information Systems</font></a></i></center></td>
<td width="45"></td>
<td><center><a href="http://www.umsl.edu/business/General_Business.html">College of Business Administration</a></i></center></td>
<td width="40"></td>
<td><center><a href="http://www.umsl.edu/">University of Missouri - St. Louis</a></i></center></td>
</tr>
</tbody></table></center></td></tr></tbody></table>
</font><h2><center>Sample JavaScript</font></center></h2>
<center>
<table width="90%" bgcolor="#bde7b7" border="2" cellpadding="15">
<tbody><tr>
<td width="50%">Thank You!<p>
You have just inserted a row into our table. <p>
To view the result, check the <a href="http://thatcher.umsl.edu/~sauterv/twentytwo.cfm">query example</a>.
|
</tbody></table>
</center>
<p><hr><p>
<img src="graphics/button2.jpg" width = 20> <a href="index.html">Return to Index</a>
</tr>
</tbody></table>
</center>
<p><hr><p>
<center>| <a href="http://www.umsl.edu/index.html">UM-St. Louis Home Page</a>
| <a href="http://www.umsl.edu/business/General_Business.html">College of
Business Page</a> | <a href="http://www.umsl.edu/business/mis/index.html">IS
Home Page</a> |</center>
<p><hr><p>
<small>
<script language="JavaScript">
// This automatically updates the last modified date for the page.
//
when = document.lastModified
document.write("This page was last modified on: " + when + "<br>")
//
// This automatically updates the location documentation on the page.
where = document.location
document.write("URL: " + where)
</script>
<br>Page Owner: <a href="http://www.umsl.edu/%7Esauter/">Professor Sauter</a>
(<a href="mailto:Vicki.Sauter@umsl.edu">Vicki.Sauter@umsl.edu</a>)<br>
</i>© Vicki L. Sauter. All rights reserved.
</body></html>
Return to Index
|