Search PalmPower's 487 Palm-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Developing a Palm VII PQA that reads data from a Domino database (continued)

Looking at the LotusScript agent code
Now let's dig into the code a bit and discuss some of the things you should include in your Web clipping scripts.

When the form is posted to the Domino server, there is a CGI variable called REQUEST_CONTENT that contains all of the values of the fields on the form. In our sample there is only one field called "Customer". The following code gets the value of the Customer field and stores it in Customer$.

Customer$ = Mid$(doc.REQUEST_CONTENT(0),Instr(1,doc.REQUEST_CONTENT(0),"=") + 1, Len(doc.REQUEST_CONTENT(0)))

When you generate a Web clipping, you need to put some information in the HEAD section of the resulting HTML. Since Domino likes to generate its own HEAD data, we need to tell Domino not to generate a HEAD section. These two lines of code prevent Domino from generating the HEAD section:

Print "Content-Type:text/plain"
Print "Content-Type:text/html"

Now that we told Domino not to generate a HEAD section we need to generate our own. Notice the meta tags in the HEAD section -- palmcomputingplatform and historylistext. These two tags tell the Palm VII that the data it's about to receive is intended for it, and that the History should contain the name of the Customer entered.

Print "<head><Title>PalmBuilder</Title>"
Print "<meta name=palmcomputingplatform content=true>"
Print "<meta name=historylisttext content=" & Ucase$(Customer$) & ">"
Print "</head>"

For the sake of simplicity we'll use the database search method to find records in the database that contain the customer name we entered. You can refine your search using other Notes classes such as the new R5 NotesViewEntryCollection.

Set c = db.ftsearch(Customer$, 0)

The rest of the LotusScript agent is simple LotusScript document collection processing. For each document in the document collection, we print the customer information from the back-end document.

We also need to provide the user with a way to navigate back to the previous page so that he or she can search for more customers.

Print "<a href=""file:Customers.pqa/Customers.html"">Back</a><p>"

Notice the reserved PQA word "file". This tells the Palm VII that the when the Back link is tapped with the stylus to load the Customers.html file in the Customers PQA.


« Previous  ·  1  ·  2  ·  3  ·  4  ·  5  ·  Next »
Other articles you might like
Home > Wireless (97 articles)
   T-Mobile's home hotspot: what's hot and what's not
   The inside story of Sereniti, a new wireless router company
   Please stop clicking on the monkey: a Q&A on home networking security
Home > Phones and PDAs > Palm and Treo > Programming (24 articles)
   How PDA software is born
   Program with Simplicity
   Kinectivity 2.0 brings enterprise application developers new tools
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Other PalmPower Articles
Palm gets up to date with new Tungsten family of handhelds
Create handwritten email with riteMail
Presenter-to-Go puts PowerPoint presentations on your Palm OS handheld
Looking for the cutting edge
Gain remote access to databases and PLCs
PalmSource Open House showcases what's new in the Palm community
Analysis: handheld market share
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
DominoPower: Application development, William Shatner, and the origin of the universe
OutlookPower: More about disappearing text
-- Advertisement --

Sent Items Organizer
When you need to file your sent email into their proper folders based on keywords or who it's to. It's also perfect for shared mailboxes.

It also adds a "Send And File" toolbar button while you're composing (similar to the way Lotus Notes used to work) for quick and easy filing.

Find out more!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login