Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
 Discussion Forums
 HTML, XML, JavaScript...
 Software Reviews
 Editors,Others...
 Top100
 JavaScript Tutorials, ...
 Tutorials
 ASP, CSS, Databases...
 Discussion List
 FAQ, Roundup, Configure ...
 Authoring
 HTML, JavaScript, CSS...
 Design
 Layout, Navigation,...
 Graphics
 Tools, Colors, Images...
 Software
 Browsers, Editors, XML...
 Internet
 Domains, E-Commerce, ...
 WDVL Resources
  Intermdiate, Tutorials,...
 WDVL
 Discussion Lists, Top 100,...
 Technology Jobs


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us
Calling Cards
Compare Prices
Best Price
Promos and Premiums
Promote Your Website
Logo Design
Online Universities
Phone Cards
Memory Upgrades
Prepaid Phone Card
Disney World Tickets
Compare Prices
Baby Photo Contest
Car Donations

Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Just because Web sites are easy to build these days, that doesn't mean it's easy to build a quality Web site that meets your business objectives.

Before developing your next Web site, or redesigning an existing site, download this Internet.com eBook to guide you through the process and plan your project, whether you're developing a site in-house or outsourcing the project.
Register now for your free Internet.com membership to download your complimentary eBook. Membership will also give you access to:

eBook library         Whitepapers         Webcasts
Newsletters         WinDrivers
Top 10 Articles
  1. Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
  2. JavaScript Tutorial for Programmers
  3. Design
  4. JavaScript Tutorial for Programmers - Objects
  5. JavaScript Tutorial for Programmers - JavaScript Grammar
  6. JavaScript Tutorial for Programmers - Versions of JavaScript
  7. Cascading Style Sheets
  8. JavaScript Tutorial for Programmers - Embedding JavaScript
  9. JavaScript Tutorial for Programmers - Functions
  10. Authoring JavaScript
Domain Name Lookup
Search to find the availability of a domain name. Just enter the complete domain name with extension (.com, .net, .edu)

More ASP using Dreamweaver UltraDev

July 9, 2001

In " ASP using Dreamweaver UltraDev and PWS" we looked at installing Personal Web Server and Macromedia Dreamweaver UltraDev to create ASP pages. We also looked at the recordsets created by UltraDev and the VBScript lines that write data into the page. Now we'll consider URL strings, links to detail pages and displaying the returned data, using a real world example of a page created for a hospital to produce instant reports from patient admission data.

Linking to Detail Pages

Creating links so your visitor can click on an item of data and to go to a more detailed Web page is easy using UltraDev. The link is created in the Server Behaviours window and the code looks something like this:

<A HREF="appt_level2.asp?<%= MM_keepURL & MM_joinChar(MM_keepURL) amp; "DoH=" & APPT.Fields.Item("DoH").Value %>">

After this code comes the data to be linked, which is likely to be a dynamic element, and then the closing </a> tag.

The first part of the code shown above is HTML defining the page your visitor will go to — appt_level2.asp. There's a question mark after the page address, and the URL string parameters will follow this. Putting parameters in the URL string is the easy way of transferring them from page to page.

The next elements are references to Macromedia subroutines (beginning MM) that create the new URL string. In this case we use the subroutine that collects existing parameters in the current URL string and passes them on to the next page, then a join character, and finally a new addition to the string, beginning with "DoH=". This will add a DoH code to the URL string, In our hospital example, DoH is a numeric value corresponding to a medical specialty. For example 190 is Anesthetics.

The code snippet APPT.Fields.Item("DoH").Value retrieves the appropriate value to be added to the URL string. It looks along the row of data for the DoH code and inserts it in the URL string. If we were starting off with a page that had a blank URL string, we might finish up moving to a detail page containing the string: appt_level2.asp?DoH=190.

Extracting values from strings

On the detail page appt_level2.asp, we need to extract the DoH value from the string to use it as a filtering parameter within a recordset — specifically within an SQL Select statement. Again UltraDev makes this straightforward, allowing us to specify a URL parameter for filtering during creation of the recordset.

It transfers the useful part of the URL string to a VBScript variable first. So if we are creating a recordset called rswebtotals and we use our previously mentioned DoH as a limiting element of the recordset's SQL statement, we find the following code created by UltrDev near the start of the page:

<%
Dim rswebtotals__varDOH
rswebtotals__varDOH = 100
if(Request.QueryString("DoH") <> "")
then rswebtotals__varDOH = Request.QueryString("DoH")
%>

[Lines 4 and 5 above are one line. They have been split for formatting purposes.]

This creates a variable called rswebtotals__varDOH and sets it equal to the value of DoH that it finds in the URL string. In case the string is empty, it first sets it to a user- specified value of 100. This is helpful when testing the page since it prevents missing parameter errors that might otherwise occur.

The variable rswebtotals__varDOH can also be displayed anywhere it's required on the page using the simple code <%= rswebtotals__varDOH %>.

The SQL Select Statement - Page 2


Up to => Home / Authoring / ASP / UltraDev




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers