One thing i love about Lotus Notes on the web is the use of computed text. It allows me easily to do some things i would have no idea how to do with java script. I was looking through the extnd database and noticed that a page was actually an xsl file, so when i was working with my Web Desktop i figured this could solve one of my problems i was having.

I wanted to have the users name in the start menu, in the sample code it was hard coded. So for the meantime i put the company name there. To solve this i took the text from the sample.js file and put it in a notes page. I then changed the page properties to say it contained something other than notes content or html.

I created some computed text
@name([cn];@username)
and put it in place of the company name.

I then changed the location of the sample.js file in the main web desktop page to point to this notes page.

I then had the username show up in the start menu. I think i will use something simalar to offer different desktop themes to the user in the near future.

 

2 Responses to Advantages with using a Notes Page to contain a JavaScript file

  1. Jeremy Hodge says:

    Very true … also note that you can get the user name in javascript using the Ext.nd.Session object. Specifically Ext.nd.Session.commonUserName … check out the agent extnd/2.0.1/Session.js in the ext.nd database …

  2. Mark Hughes says:

    @1 Good point, i have used that before, must have slipped my mind.

Leave a Reply

Your email address will not be published. Required fields are marked *