Blogs

  • Browse Blogs
  • My Blog
  • My Updates

Tags Help

  • View as cloud  | list

Similar Entries

photo

Great post you shoul...

Blog:  Lotus Nut
Chris Whisonant
Updated 
No Ratings 0     Comments 1
photo

Bandwidth - Africa's...

Blog:  A day in the ...
Andre Horak
Updated 
No Ratings 0     No Comments 0
photo

The starting point

Blog:  A day in the ...
Andre Horak
Updated 
No Ratings 0     No Comments 0
photo

From Lotus Sandbox -...

Blog:  JEC's Blog
Dale Cole
Updated 
No Ratings 0     No Comments 0
photo

Lotus Notes server h...

Blog:  Steve's Lotus...
Steve Medure
Updated 
Ratings 1     Comments 1

Dogear Bookmarks

A Coder From South Africa

Blog Authors:  John Jardin  

Previous |  Main  | Next

Did You Know - 1: Dynamic Urls for Notes

John Jardin  |    |  Tags:  urls links web lotus hotspots  |  Comments (2)
This morning, while training a few developers, I stumbled upon a piece of functionality I would've never thought existed in notes:

I was teaching the pro's and con's of using qualified vs relative vs dynamic urls, and made good mention of @WebDbName and it's benefits. In my example, I wanted to show how a url would look in order to "compose a form" when creating hotspots in Forms or Pages. Below is an example of how this could be done, from worst to best:

QUALIFIED URL = "http://www.domainname.com/ApplicationFolder/DatabaseName.nsf/FormAliasName?OpenForm"

RELATIVE URL = "/ApplicationFolder/DatabaseName.nsf/FormAliasName?OpenForm"

DYNAMIC URL = "/" + @WebDbName + "/FormAliasName?OpenForm"

When one of the developers asked me what would happen if just adding the "/FormAliasName?OpenForm", leaving out the beginning "/" and @WebDbName, I laughed and said that the url returned will be dodgy and incorrect. Been a person who believes in visually proving a point, I changed the code in my hotspot, and added the following url, "FormAliasName?OpenForm", not realizing that I accidentally left out the "/" before the "FormAliasName". Low and behold, the result was a fully qualified url where the domain, filepath and file name were dynamically generated by Notes itself, without any need of using @WebDbName.


BOTTOM LINE:


"FormAliasName?OpenForm" - WORKS and REPLACES "/" + @WebDbName + "/FormAliasName?OpenForm"

"/FormAliasName?OpenForm" - DOESN'T WORK


N.B. The Above example assumes that you are composing a Form on the current server, in the current database.


Cheers
John

Comments

1 Karl-Henry Martinsson      Permalink This is actually not a function of Domino, but of the browsers.
What you call "dynamic URL" is just a relative URL being built dynamically. You can build fully qualified URLs dynamically as well.
The same way as you in a traditional HTML page can reference another page (or image) in the same directory without specifying the path (relative or fully qualified), you can do that in Domino as well, for items that are on the same "level".
So in your example, you are in a form and call another form. They are on the same level, and you do not need to specify a path, the same way as if you would have foo.html and bar.html in the same directory and reference one from the other.
The reason the "/FormAliasName" does not work is that the browser then start at the top of the server, not including the database path and filename.

2 John Jardin      Permalink Note Taken. Thanks for the feedback. :)


Previous |  Main  | Next
Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About

Tags

A tag is a keyword that is used to categorize an entry. To view the entries with a particular tag, click a tag name or enter a tag in the box.
The tag cloud indicates the frequency of tag use. Popular tags appear darkest. The slider control adjusts how many tags are displayed in the tag cloud.