Create an HTML document which uses the XMLHttpRequest object to submit the customer profile created in Exercise 28.4. Also, create an ASP page which accepts the submitted data and inputs it into the database.

What will be an ideal response?


```

1 <% @LANGUAGE = "VBScript" %>

2 <% Option Explicit %>

3 <% Response.Expires = 0 %>

4 <%

5 ' Example 28.6 : customerSubmit.asp

6

7 Dim xmlData, xmlRoot, xmlBill, xmlShip, xmlCredit

8 Dim objConn, objRS

9

10 Set xmlData = Server.CreateObject( "Microsoft.XMLDOM" )

11 xmlData.Async = False

12 Call xmlData.Load( Request )

13

14 Set xmlRoot = xmlData.DocumentElement

15 Set xmlBill = xmlRoot.SelectSingleNode( "bill" )

16 Set xmlShip = xmlRoot.SelectSingleNode( "ship" )

17 Set xmlCredit = xmlRoot.SelectSingleNode( "credit" )

18

19 Set objConn = Server.CreateObject( "ADODB.Connection" )

20 Set objRS = Server.CreateObject( "ADODB.RecordSet" )

21 Call objConn.Open( "DSN=dbStorefront" )

22

23 objRS.ActiveConnection = objConn

24 objRS.Source = "Customer"

25 objRS.CursorType = 1 ' adOpenKeyset

26 objRS.LockType = 2 ' adLockPessimistic

27 Call objRS.Open()

28

29 Call objRS.AddNew()

30 objRS( "userid" ) = _

31 xmlRoot.SelectSingleNode( "userid" ).text

32 objRS( "passwor

Computer Science & Information Technology

You might also like to view...

Public networks allow traveling users to obtain a remote network connection.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Describe in a paragraph the “politics” of the Training and Management Systems Department at M R E? Who is involved and what are some of the main issues?

What will be an ideal response?

Computer Science & Information Technology

Case-Based Critical Thinking QuestionsCase 8-1James created a table of his school soccer team schedule that will be placed on the team's Web page. The table contains four columns: Opponent, Home/Away, Date, and Start Time. The table will contain 10 rows. James has some problems with formatting the table and asks Kyra to help him resolve them.James asks Kyra how he should center data within the table's header cells. Which of the following is the correct answer Kyra gives James?

A. Use the table header element to format the first row of a table. B. Use the table header element to format the first row of a table with the center value for the align attribute. C. Apply the statement text-align: center; to all of the table's header cells. D. none of the above

Computer Science & Information Technology

To create a new worksheet when Calc is already open, click on ________, point to New, and then click Spreadsheet

A) Home B) File C) Open D) Insert

Computer Science & Information Technology