< Back

Document Subject: Open Document in Browser from client
Hint Short Cut: Add this to your code & documentation to help you find this page.
http://#OpenDocInBrowser or http://A555F9/nn.nsf/ByAlias/OpenDocInBrowser
Add this as a button in a notes view such as a conflicts view for example or as a smarticon
srvr:=@Subset(@DbName;1);

r:=@If(@ClientType="Web";
 @GetHTTPHeader("Host");
 @DbLookup("";srvr:"names.nsf";"($Servers)";@Subset(@DbName;1);"HTTP_HostName"));

s:=@If(@IsError(r) | @Text(r)="";
@DbLookup("";srvr:"names.nsf";"($Servers)";@Subset(@DbName;1);"SMTPFullHostDomain");
r);
url:="http://"+@Text(s)+"/"+@WebDbName+"/0/"+@text(@documentuniqueid)+"?Opendocument";
url2:=@Prompt([OKCancelEdit];"Url";"Url";url);
@URLOpen(url2)