SearchDomino.com
August 6, 2001
Developer Tip
================================================= 
------------------------------------------------- 
Sponsored By: SWING Software
------------------------------------------------- 
************* MS OFFICE INTEGRATION *************
Integrate your applications with Microsoft Office using new SWING
Integrator v2.1. Create, save, edit Office documents as attachments;
field exchange, mail-merge, labels, templates... Now there's no
easier way. No DLLs -- no end-user licenses -- unlimited distribution
(ROYALTY-FREE)! Learn what hundreds of developers and thousands of
end-users already know. http://www.swingsoftware.com/searchdomino.htm

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
================================================= 
Feature Tip
================================================= 
Title: Creating good URL keys

This tip was submitted by Jens Bruntt, a R5 Principal Developer from
Denmark and a searchDomino.com site expert.

EDITOR'S NOTE: Because the coding my be altered in our email, we have
indicated umlauts as "a" (umlaut); ampersands as "&" (ampersand) and
circumflex's as "a" (circumflex) in the code below. The actual
characters may not appear correctly in your email or on our Web site,
so we have indicated them as such.  Also, in all of the URLs listed
below, we have removed one of the t's (in http) to avoid confusion in
emails or browser clients.


This tip is especially useful for Domino developers developing in an
environment where national characters are used, but it could be
relevant to most of us, as most Domino Web developers find themselves
computing keys for URLs that might end up containing characters that
are either reserved (like "?" or "&") or which the browser or server
won't accept as part of a URL. 

Let's say you want to compute a URL leading to a document from a
person's name. For instance if you'd like my name to be clickable and
to have it lead to a document containing my CV, or resume. 

The URL would be something like
htp://yourserver/yourdb.nsf/people/a_key?OpenDocument
What would the key be?
It could be JensBruntt (as in @replacesubstring(thename; " "; "").

How about those annoying URL-incompatible characters like the "�"
(umlaut) or the "�" (circumflex) or how about the good old ampersand
"&" which might confuse the situation as it is reserved in the Domino
server? With some browsers you would get nowhere with a � (umlaut) in
the URL. 

I suggest that you look at the @password function. 

@Password encodes a string from a readable format to a password
format - basically just garbling up the original string. The
password-string will always be the same when treating the same
string. Jens Bruntt will always be converted to
"(245AFE01FA27D12BBAF917BE8D3A4F0C)". Mich Luneburg will always be
"(3BFD018A4256B5C5B43B62460A5190B0)". And no non-URL compatible
characters in the string. 

So if we compute the URL like this:
"htp://yourserver/yourdb.nsf/people/" +
@ReplaceSubstring(@Password(a_key); "(":")"; "") + "?OpenDocument" 
and in the people view we sort the first column on @ReplaceSubstring
(@Password(CV_fullname); "(":")"; "") - assuming we have my name in
the CV_fullname field - you have a nice key that won't break your
URLs even when they contain those reserved or problematic characters.

http://searchdomino.techtarget.com/tip/1,289483,sid4_gci758501,00.html

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
================================================= 
Do you have a comment on this tip?  Jump into our Developer
Discussion forums and toss your ideas around with your peers:
http://searchdomino.discussions.techtarget.com/WebX?50@@.ee7740b

OR SEND US YOUR FEEDBACK TO BE POSTED ON THIS TIP TO:
[EMAIL PROTECTED]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
================================================= 
------------------------------------------------- 
Sponsored By: THE VIEW Domino Developers Conference
------------------------------------------------- 
At this must-attend event for Domino Developers, you get in-depth
instruction and hands-on training to build on your existing skills,
take advantage of the hottest technologies, and dive into the latest
advances in Domino development. World-class experts like Debbie Lynd,
Bob Balaban, Tony Higham and Kevin Marshall deliver hard-core
programming techniques you can put to use right away to solve your
toughest development challenges! Visit http://www.eVIEW.com/domdev
for more information and to save $200 when you register today!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
================================================= 
NEWLY POSTED DEVELOPER TIPS: 
================================================= 
We posted 18 new tips last week. Thanks for all your tips and keep
them coming!

Agent Category:
http://searchdomino.techtarget.com/tipsIndex/0,289482,sid4_tax283834_alpD_idx0,00.html
[1] Export To Excel
[2] Recreating print view on the Web
[3] Issue server console tasks from LS agents
[4] Get server environment variables from a script running on a
workstation

Domino Category:
http://searchdomino.techtarget.com/tipsIndex/0,289482,sid4_tax283837_alpD_idx0,00.html
[1] Techniques for hiding file attachments on the Web
[2] Changing new default mail arrival wave
[3] Hide File-Edit-View menu in Notes applications

Formula Category:
http://searchdomino.techtarget.com/tipsIndex/0,289482,sid4_tax283836_alpD_idx0,00.html
[1] Update workspace icon when moving a database

HTML Category
http://searchdomino.techtarget.com/tipsIndex/0,289482,sid4_tax283838_alpD_idx0,00.html
[1] Spruce up Domino buttons
[2] Computed field for the Web

JavaScript Category:
http://searchdomino.techtarget.com/tipsIndex/0,289482,sid4_tax283840_alpD_idx0,00.html
[1] Input validation that uses HTML field attributes in R5

Other Category:
http://searchdomino.techtarget.com/tipsIndex/0,289482,sid4_tax283842_alpD_idx0,00.html
[1] Configuring Notes/Domino with Crystal Reports
[2] View all hidden views

Script Category:
http://searchdomino.techtarget.com/tipsIndex/0,289482,sid4_tax283841_alpD_idx0,00.html
[1] Update your antivirus using Notes
[2] Control your CDROM drive with a button
[3] Script version to find last date of month
[4] SQL access from Notes - check registry!
[5] Script to find a character code (CHR)

================================================= 
FEATURED BOOK:
================================================= 
Programming Workflow Applications with Domino   
By Daniel Giblin and Richard Lam

Harness the power of groupware to reshape business processes and
customer interactions. This book will permit you to implement
Web-based workflow applications using the industry-standard groupware
environment, Domino R5.

http://www.digitalguru.com/dgstore/product.asp?sku=1929629060&dept%5Fid=288&ac%5Fid=60&accountnumber=&couponnumber

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
================================================= 
Disclaimer: These tips are submitted by your Domino peers. Our tips
services and online tips exchange are a way for you to learn from
other IT professionals and share technical advice and expertise with
your peers. Techtarget.com provides the infrastructure to facilitate
this sharing of information. However, we can't guarantee the accuracy
and validity of the material submitted. You agree that your use of
the searchDomino.com tips services and your reliance on any
questions, answers, information or other materials received through
searchDomino.com will be at your own risk.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
================================================= 
NOTIFY US WITH FEEDBACK  
================================================= 
Send us your tips feedback! Cast your vote and send us your tips
comments.  If you have vital code information or other comments you'd
like to add to one of our online tips, send your comments to
[EMAIL PROTECTED], and we'll add your User Feedback to the
online tip!

================================================= 
If you would like to sponsor this or any TechTarget newsletter,
please contact Gabrielle DeRussy at [EMAIL PROTECTED]

================================================= 



If you no longer wish to receive this newsletter simply reply to 
this message with "REMOVE" in the subject line.  Or, visit 
http://searchDomino.techtarget.com/register 
and adjust your subscriptions accordingly. 

If you choose to unsubscribe using our automated processing, you 
must send the "REMOVE" request from the email account to which 
this newsletter was delivered.  Please allow 24 hours for your 
"REMOVE" request to be processed.

Reply via email to