Developing Database-resident Help for Customizable Web-based Applications Scott DeLoach.

Slides:



Advertisements
Similar presentations
Developing Customizable and Database-resident Help Scott DeLoach.
Advertisements

WordPress Installation for Beginners Sheila Bergman
Developing Context-sensitive Help for Web Applications Scott DeLoach.
Designing Embedded User Assistance for Web- based Applications Scott DeLoach.
Tutorial 5 Windows and Frames Section A - Working with Windows.
Office Links - Sharing Data in Microsoft Office A Mixed Bag of Treasures Chester N. Barkan Registrar Long Island University, C.W.Post Campus.
Working with Tables for Page Design – Lesson 41 Working with Tables for Page Design Lesson 4.
Session 13 Active Server Pages (ASP) Matakuliah: M0114/Web Based Programming Tahun: 2005 Versi: 5.
Macromedia Dreamweaver 4 Foundation Level Course.
Session 6 Server-side programming - ASP. An ASP page is an HTML page interspersed with server-side code. The.ASP extension instead of.HTM denotes server-side.
The ADO Data Control. Universal Data Access Open Database Connectivity (ODBC) –standard for accessing data in databases OLE-DB –allows access to data.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall COS 346 Day 23.
CVEV 118/698 Active Server Pages Lecture 3 Prof. Mounir Mabsout Elsa Sulukdjian Walid El Asmar.
1 Active Server Pages Active Server Pages (ASPs) are Web pages ASP = server-side scripts + HTML The appearance of an Active Server Page depends on who.
Introduction to Active Server Pages
4/8/99 C. Edward Chow Page 1 Active Server Page It is a server-side scripting environment for creating dynamic content. ASP are files with.asp extension,
Multiple Tiers in Action
Dynamic Web Sites DECO 3001 Tutorial 6 – Form Presented by Ji Soo Yoon 30 April 2004 Slides adopted from
Master Detail Page Set Enabling Users to See More Detailed Data.
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
CONFIGURING WINDOWS SERVER MIS 424 Professor Sandvig.
Using Data Active Server Pages Objectives In this chapter, you will: Learn about variables and constants Explore application and session variables Learn.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
WaveMaker Visual AJAX Studio 4.0 Training Studio Overview.
Additional Topics. Tutorial #9 Review – Forms Forms Legend and fieldset Fields Text Password Radio buttons, check box, text area, select lists Buttons.
Scott Marino MSMIS Summer Session Web Site Design and Authoring Session 9 Scott Marino.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 12-1 David M. Kroenke’s Chapter Twelve: ODBC, OLE DB, ADO, and ASP Part.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
JavaScript, Fourth Edition
Using Visual Basic 6.0 to Create Web-Based Database Applications
Elements of ASP Documents Adapted from MCDN Web Workshop ( and Webmonkey’s Introduction to Active.
Mark Dixon 1 22 – Web applications: Writing data to Databases using ASP.Net.
Tutorial 10 by Sam ine1020 Introduction to Internet Engineering 1 Database & Server-side Scripting Tutorial 10.
Macromedia Dreamweaver 8 Revealed DREAMWEAVER GETTING STARTED WITH.
Chapter 8 Cookies And Security JavaScript, Third Edition.
National Center for Supercomputing Applications NCSA OPIE Presentation November 2000.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Introduction to JavaScript 41 Introduction to Programming the WWW I CMSC Winter 2004 Lecture 17.
Plant Accession Application Maintenance Manual. Accession Application Website Environment Overview WinHost.com ASP Pages VBScript Procs Constants Style.
What is database?  Any Method for access info into Application from DataBase?  ODBC is standard for Accessing Data.  Problem with ODBC:  Information.
How to Connect to Database ODBC (Open Database Connectivity) ADO (ActiveX Data Object) ASP Code To Connect to Database Recordset Object Navigating through.
About These Slides This slide set is designed to be used with the OMA sample application It is recommended you follow the steps outlined in the “Preparing.
Access Chapter 8- Integrating Access with the Internet and other Programs.
Paging Through a Data Table Creating a Navigation Bar Using the Recordset Navigation Bar Server Behavior.
XRX Basic CRUDS Create, Read, Update and Delete and Search XML Data Date: May 2011 Dan McCreary President Dan McCreary & Associates
Client-side & Server-side Scripting ©Richard L. Goldman August 5, 2003 Requires PowerPoint 2002 or later for full functionality.
June 23, 2001Database Creation Review and Exercises1 Building an Application - Part I -
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Digital Library Syllabus Uploader Will Cameron CSC 8530 Fall 2006 Presentation 1.
Invitation to Computer Science 6 th Edition Chapter 10 The Tower of Babel.
HTML Hyper Text Markup Language. The Basics u HTML documents contain “tags” which instruct the Browser software on how to present the information within.
LOGIN PAGE Login Page Support CRM:
7-1 Active Server and ADO Colorado Technical University IT420 Tim Peterson.
Using databases ActiveX Data Objects (ADO) Connecting to a database Reading data from a database Inserting, updating and deleting records Using databases.
Web based Documentation Distribution Tools: MSAccess database (DSN) DreamWeaver Ultradev Microsoft Image Composer Clicking on the document will open an.
Air Force Security Assistance Center Report.Web Tutorial AFSAC Schoolhouse DSN (937) Jun 2016 "THIS BRIEFING/PRESENTATION/DOCUMENT.
Generating XML Data from a Database Eugenia Fernandez IUPUI.
ASP Mr. Baha & Dr.Husam Osta  What is ASP?  Internet Information Services  How Does ASP Differ from HTML?  What can ASP do for you?  ASP Basic.
INT213 Active Server Pages using Visual Basic Scripting.
Microsoft FrontPage 2003 Illustrated Complete Creating a Web Site.
Cooperation (AFSAC) Directorate Integrity  Service  Excellence
Computing Fundamentals
Displaying a Data Table
Client / Server Application Presentation
C/S Windows Overview Nigel Pilsbury.
More to Learn Viewing file details
Presentation transcript:

Developing Database-resident Help for Customizable Web-based Applications Scott DeLoach

Using a database - Storing topics in a database - Opening help topics from an application - Reading the help from the database - Formatting the help Customizing help topics - Hiding links based on the user's login - Modifying topics on the fly - Allowing users to modify and add topics Recommendations and sample system Overview

sample_login.htm Sample application

field-level help page-level help sample_home.htm Sample application

Storing topics in a database "HlpText" is used to store default topics. "HlpTextCustom" is used to store modified topics.

Opening help topics function openFieldHelp(topic) { window.open('fieldhelp.asp?' + topic,'helpwin','toolbar=0, location=0,directories=0,status=0,menubar=0,scrollbars=1, resizable=0,width=600,height=400'); } ASP

Turning HTML files into ASP files Hello! defines VBScript constants that make code easier to read ASP

Opening the database Dim objConn Set objConn = Server.CreateObject("ADODB.Connection") objConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\db\fieldhelp.mdb") Dim objRS Set objRS = Server.CreateObject("ADODB.Recordset") objRS.Open "Tutorial", objConn,,, adCmdTable ASP

Finding and formatting the help Do While Not objRS.EOF If Request.QueryString = objRS("FieldID") Then If objRS("HlpTextCustom") <> "" Then Response.Write " "& objRS("FieldLabel") & " " & objRS("HlpTextCustom") Else Response.Write " "& objRS("FieldLabel") & " " & objRS("HlpText") End If objRS.MoveNext Loop ASP If Request.QueryString = objRS("FieldID") Then If objRS("HlpTextCustom") <> "" Then HlpTextCustom HlpText

Opening help topics function openFieldHelp(topic) { window.open('fieldhelp.htm?' + topic,'helpwin','toolbar=0, location=0,directories=0,status=0,menubar=0,scrollbars=1, resizable=0,width=600,height=400'); } JavaScript

Creating a hidden frame (fieldhelp.htm) JavaScript fieldhelp.txt (comma-delimited version of database) "ProjectNumber","Project Number","The number …."," Note: This number is automatically generated." "Description","Description","A brief ….", "StartDate","Start Date","When the project needs to begin.", "CompletionDate","Completion Date","When the project should end.", ….

Finding and formatting the help var topic = location.search.substring(1); function getTopic() { var allTopics = db.document.body.innerHTML; allTopics = allTopics.split("\""); for (var i=0; i < allTopics.length; i++) { if (allTopics[i] == topic) { help.document.body.innerHTML = " " + allTopics[i+2] + " " + " " + allTopics[i+4] + " "; break } } } JavaScript depends on your delimiter depends on how you save the file

Hiding links based on the users login hide this link if the user is not logged in as admin sample_help.htm

Hiding links based on the users login Code to hide links (in sample_help.asp) <% If Session("security") = "admin" Then Response.Write Customizing the application " End If %> ASP

Hiding links based on the user's login Code to write the cookie (in sample_login.htm) var today = new Date(); var expires = new Date(today.getTime() + (60 * )); function set() { var cookieID = document.form.name.value; Set_Cookie("security",cookieID,expires); } function Set_Cookie(name,value,expires) { document.cookie = name + "=" + value + "=" + "; path=/" + ((expires==null) ? "" : "; expires=" + expires.toGMTString()); } code for the Submit button: number of days to store the cookie JavaScript onClick="set()" Set_Cookie("security",cookieID,expires); document.cookie

Code to tag links (in sample_help.htm) Customizing the application Hiding links based on the user's login JavaScript

Code to hide links (in sample_help.htm) var security=unescape(document.cookie); if (security.indexOf('admin') == -1) { for (var i=0; i < document.links.length; i++) { if (document.links[i].id.indexOf("admin") != -1) document.links[i].innerText = ""; } Hiding links based on the user's login JavaScript var security=unescape(document.cookie); document.links[i].innerText = "";

Modifying topics on the fly sample_help.asp sample_home.asp field names need to match between application and help

Modifying topics on the fly Do While Not objRS.EOF Response.Write " " & objRS("FieldLabel") & " " If objRS("HlpTextCustom") <> "" Then Response.Write objRS("HlpTextCustom") & " " Else If objRS("HlpText") <> "" Then Response.Write objRS("HlpText") & " " Else Response.Write "No Help has been written for this field. " End If objRS.MoveNext Loop ASP objRS("FieldLabel") objRS("HlpTextCustom") objRS("HlpText") No Help has been written for this field.

Modifying topics on the fly Code to tag application elements (in sample_home.htm) Project Number JavaScript

Modifying topics on the fly Code to read from application and modify Help (in sample_help.htm) var projectnumber = "The " + (opener.document.all.projectnumber.innerText).toLowerCase() + ".... "; // repeat above for each field on page var form = opener.document.forms[0]; for (i= 0; i < form.elements.length-1; i++) { var elemspan = (form.elements[i].name).substr(5); document.write(" " + opener.document.all[elemspan].innerText + " "); document.write(eval(elemspan)); } chops off name_ JavaScript (opener.document.all.projectnumber.innerText).toLowerCase()

Allowing users to modify/add topics fieldhelp.asp administrators see the Edit button, which they can use to add or change the field help topics. fieldhelp_edit.asp

Allowing users to modify/add topics Code to show the Edit button (in fieldhelp.asp) If Session("security") = "admin" Then Response.Write " " ASP

Allowing users to modify/add topics Code to display the Edit form (1 of 2) (in fieldhelpedit.asp) Do While Not objRS.EOF If Request.QueryString = objRS("FieldID") Then Response.Write " "& objRS("FieldLabel") & " " Response.Write " " If objRS("HlpTextCustom") <> "" Then Response.Write " " & objRS("HlpTextCustom") & " " Else Response.Write " " & objRS("HlpText") & " " End If ASP objRS("HlpTextCustom") objRS("HlpText")

Allowing users to modify/add topics Code to display the Edit form (2 of 2) (in fieldhelpedit.asp) … Response.Write " " End If objRS.MoveNext Loop ASP

Allowing users to modify/add topics Code to update the help (in fieldhelpupdate.asp) Do While Not objRS.EOF If Request.QueryString = objRS("FieldID") Then If Request.Form("helptext") <> "" Then objRS("HlpTextCustom") = Request.Form("helptext") objRS.Update End If objRS.MoveNext Loop ASP

Recommended JavaScript books JavaScript Visual Quickstart Guide Tom Negrino and Dori Smith Designing with JavaScript Nick Heinle and Bill Peña JavaScript Bible Danny Goodman

Teach Yourself Active Server Pages in 21 Days Scott Mitchell and James Atkinson VBScript in a Nutshell Matt Childs, Paul Lomax, & Ron Petrusha Recommended VBScript and ASP books

ASP sample files (zipped and live demo) (Brinkster is a free ASP hosting site, so it goes down from time to time.) Presentation Other Demos Viewing and downloading the sample files

Feel free to me. Or, catch me later at the conference! Scott DeLoach Founding Partner, User First Services, Inc. Certified RoboHELP Instructor and Consultant CIW Master Designer Questions ?