• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 15. Using ASP with JavaScript > Inserting Records into Access from HTML

Inserting Records into Access from HTML

The final step is to create an HTML page through which you can add data to your database. JavaScript plays the role of checking your data before submitting it. First, you need to create your web page for data entry, and then you need to create your ASP page to send the data to your Access file on the server. (After you add your data, you can use the script in the previous section to read it and make sure that it’s all there.)


<style type="text/css"> 
body {
#myText {color:ff2626; background-color:black} 
<script language="JavaScript"> 
function verify() {
      var flag=0; 
      for(var counter=0;counter < dv.length−2;counter++) {
            if(dv.elements[counter].value=="") {
      if(flag==1) {
            alert("Please fill in all parts of the form:"); 
     } else {
            alert("Form is ready to submit"); 
<body onLoad="document.reporter.reset()"> 
<h3>Fill in all windows in the form </h3> 
<div ID="myText"> 
<form name="reporter" method=POST 
      <input type=text name="ID">ID <br> 
      <input type=text name="Lname">Last Name <br> 
      <input type=text name="Fname">First Name <br> 
      <input type=text name="Address"> Address <br> 
      <input type=text name="City"> City <br> 
      <input type=text name="State" size=2>State <br> 
      <input type=text name="Zip" size=5>Zip <br> 
      <input type=text name="Phone" size=10> Phone <br> 
      <input type=text name="Email"> Email <p> 
      <input type=button value="Verify:" onClick="verify()"> &nbsp; 
      <input type=submit value="Send information to database:"> 




Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint