en · de

SnTT: Save HTTP_Referer

by Bernd,
assono GmbH, Standort Hamburg,


SNTT.gif In web development the CGI-variable HTTP_Referer provide information form which web page a user came to the current web page. For a feedback database where users could leave comments about a certain web page this information is existential.

To access the HTTP_Referer in Lotus Domino you only need a field with the same name in form. The first idea is to just make this field "Computed when composed". But this one falls short.


When the feedback document is opened in the browser the field HTTP_Referer contains the URL from the web page the user came from. But before the Domino Server saves the document he recalculates the field HTTP_Referer. So the document in the database only has the URL of the feedback document but not the URL of the original web page.

There is quite a simple solution for this problem. I added a new field "Page" to the form. The field is "Computed when composed" with a formula referring to itself and it is hidden while in edit mode.
Instead of the field a computed text with Pass-thru HTML is visible in edit mode with the following formula.
"<input name=\"Page\" value=\"" + HTTP_Referer + "\" readonly >"

A picture named M2

When the Domino Server generates the HTML for the feedback web page the field HTTP_Referer contains the URL of the original web page. The computed text writes the value as a hidden input with the same name as the field to the HTML. When the user hits the submit button the value will be transferred to the Domino Server together with all the other fields. While the Domino Server saves the document there is no need to recalculate the value.

Technical article IBM Domino Development

You have questions about this article? Contact us: blog@assono.de

Sie wollen eine individuelle Beratung oder einen Workshop? Read more

More interesting entries

Any questions? Contact us.

If you want to know more about our offers, you can contact us at any time. There are several ways to contact us for a non-binding first consultation.

assono GmbH

Location Kiel (headquarters)
assono GmbH
Lise-Meitner-Straße 1–7
24223 Schwentinental

Location Hamburg
assono GmbH
Bornkampsweg 58
22761 Hamburg

Phone numbers:
Human resources department: +49 4307 900 407
Marketing department: +49 4307 900 411

E-Mail adresses:
contact@assono.de
bewerbung@assono.de