Updated LoadRicoClient for asp and php, so all asp and php examples are working again...
[infodrom/rico3] / examples / asp / ShipperEdit.asp
1 <%@ LANGUAGE="VBSCRIPT" %>\r
2 <% Response.CacheControl = "no-cache" %>\r
3 <% Response.AddHeader "Pragma", "no-cache" %> \r
4 <% Response.Expires = -1 %>\r
5 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r
6 <html>\r
7 <head>\r
8 <title>Rico LiveGrid-Shippers (editable)</title>\r
9 \r
10 <!-- #INCLUDE FILE = "dbConnect.asp" --> \r
11 <!-- #INCLUDE FILE = "../../plugins/asp/ricoLiveGridForms.vbs" --> \r
12 <!-- #INCLUDE FILE = "../../plugins/asp/LoadRicoClient.asp" -->\r
13 <%\r
14 Dim RicoClient\r
15 set RicoClient = new LoadRicoClient\r
16 RicoClient.SetRicoClientParentPath "../../ricoClient/"\r
17 RicoClient.CheckQueryString   ' just for demo\r
18 RicoClient.CreateLinks\r
19 set RicoClient = Nothing\r
20 %>\r
21 \r
22 <link href="../demo.css" type="text/css" rel="stylesheet" />\r
23 <style type="text/css">
24 div.ricoLG_cell {
25   white-space:nowrap;
26 }
27 </style>
28 </head>\r
29 \r
30 \r
31 <body>\r
32 \r
33 <%\r
34 '************************************************************************************************************\r
35 '  LiveGrid-Edit Example\r
36 '************************************************************************************************************\r
37 '  Matt Brown\r
38 '************************************************************************************************************\r
39 \r
40 if OpenGridForm(empty,"shippers") then\r
41   if oForm.action="table" then\r
42     DisplayTable\r
43   else\r
44     DefineFields\r
45   end if\r
46 end if\r
47 CloseApp\r
48 \r
49 \r
50 sub DisplayTable()\r
51   response.write vbLf & "<div id='explanation'>"\r
52   response.write vbLf & "Base Library: <script type='text/javascript'>document.write(Rico.Lib+' '+Rico.LibVersion);</script>"\r
53   response.write vbLf & "<hr>The data on this grid can be edited using pop-up forms. "\r
54   response.write vbLf & "Just click on a grid cell and then select Edit, Delete, or Add from the pop-up menu. "\r
55   response.write vbLf & "The Add and Edit forms are automatically generated by LiveGrid. "\r
56   response.write vbLf & "Updates are disabled on the database, so you will get an error message if you try to save."\r
57   response.write vbLf & "</div>"\r
58 \r
59   response.write "<p><strong>Shippers Table</strong></p>"
60 \r
61   oForm.options("frozenColumns")=1\r
62   oForm.options("menuEvent")="click"\r
63   oForm.options("highlightElem")="cursorRow"\r
64   DefineFields\r
65 \r
66   'response.write "<p><textarea id='shippers_debugmsgs' rows='5' cols='80' style='font-size:smaller;'></textarea>"\r
67 end sub\r
68 \r
69 \r
70 sub DefineFields()\r
71   oForm.AddEntryFieldW "ShipperID", "ID", "B", "<auto>",50
72   oForm.AddEntryFieldW "CompanyName", "Company Name", "B", "", 150
73   oForm.ConfirmDeleteColumn
74   oForm.SortAsc
75   oForm.AddEntryFieldW "Phone", "Phone Number", "B", "", 150
76 \r
77   oForm.DisplayPage\r
78 end sub\r
79 \r
80 %>\r
81 \r
82 </body>\r
83 </html>\r