Hi forum.I couldn’t find somehting helpful in the postings, so…
I would like homepage.nsf to do the following:
1 A user access to homepage.nsf
-
a script or formula gets the browser’s language.
-
Script or formula opens frameset in user’s language.
I have written scripts that do open different framesets, but I can’t find a way, to get them activated, when users access the server (resp. homepage.nsf) over the web. There should be something like a queryopen for a database or something similar. May be I am just walking in the wrong direction.
And i have found fromuals to get to the user’s browser Version or OS version, but not the browser’ language.
Any suggestions?
Every comment is welcome.
Thanks
Klaus
Subject: RE: CGI variable
Thanks. I think I roughly understand the direction you’re suggesting.
Excuse me being a pest, but I am afraid, I am not deep enough into this yet, to really understand where to go from here.
Would you mind explaining this a bit more detailed? The parts I dont’t understand are:
-
On a page, I cant’t create fields to get hold of a variable. So how do I do this?
-
Where exactly do I define “building the correct frameset”?
-
In the start-options of the database - what do I define in the option “When opened in a browser” - the “about database document”? An do my programming in there?
Thanks a lot in advance.
Klaus
Subject: Explination
Klaus,
I saw that you have an already working solution which works with an agent. My solution was based an a form (no need for an agent). For example a form named “Homepage”. On this form you would have several fields:
This form you would referer to in the URL or if it was a starting URL for your website in the server document / website document.
Do a search for $$HTMLHead in LDD Today and check for example this article: http://www-10.lotus.com/ldd/today.nsf/62f62847467a8f78052568a80055b380/0ad43b5de337c0c2852566c50059fe95?OpenDocument&Highlight=0,%24%24HTMLHead
Subject: homepage.nsf and different browser languages - solved
here’s my agent, that is launched via open-url in server document or directly in browser:
(all you need is to copy-paste this agent into your db and have the designated frameset prepared.)
sub initialize
Print "Content-Type:text/plain"
Print "Content-Type:text/html"
Print "<HTML>"
Dim session As New NotesSession
Dim doc As NotesDocument
Set doc = session.DocumentContext
Print "<H2>" + doc.Subject(0) + "</H2>"
Print "<H2>IP address is " + doc.Remote_Addr(0) + "</H2>"
Print "<H2>Sprache: " + doc.HTTP_Accept_language(0) + "</H2>"
Print "<H2>Browser: " + doc.HTTP_User_Agent(0) + "</H2>"
Print "<H2>HTTPS: " + doc.HTTPS(0) + "</H2>"
Print "<H2>Remote Host: " + doc.Remote_Host(0) + "</H2>"
Print "<H2>Remote Ident: " + doc.Remote_Ident(0) + "</H2>"
Print "<H2>Remote User: " + doc.Remote_User(0) + "</H2>"
Print "<H2>Server Name: " + doc.Server_Name(0) + "</H2>"
Print "<H2>Server Protocol: " + doc.Server_Protocol(0) + "</H2>"
Print "<H2>Server Port: " + doc.Server_Port(0) + "</H2>"
Print "<H2>Server Software: " + doc.Server_Software(0) + "</H2>"
lang = "en"
If Instr(1,doc.HTTP_Accept_Language(0),"de",5) <> 0 Then
lang = "de"
End If
Print "<H2>Sprache: "lang"</H2>"
Print "<HEAD>"
Select Case lang
Case "en"
Print "<META HTTP-EQUIV=""Refresh""
CONTENT=““10;URL=http://chzns510/chz_db/ID1/budget.nsf/Frameset.Start.en?Open””>"
Case "de"
Print "<META HTTP-EQUIV=""Refresh""
CONTENT=““10;URL=http://chzns510/chz_db/ID1/budget.nsf/Frameset.Start.de?Open””>"
End Select
Print "</HEAD>"
Print "</HTML>"
end sub