Autor Thema: how to open the mail file dynamically with JavaScript ?  (Gelesen 1259 mal)

Offline Toma Bogdan

  • Aktives Mitglied
  • ***
  • Beiträge: 146
  • Geschlecht: Männlich
  • That's me ...
    • A nice site !
how can I open the mail file dynamically with JavaScript ? something like this

- for user 1
Code
var win=window.open("http://server_name/mail/user1.nsf\\(MSG)?OpenView" , "tw", "width=680,height=500,status=yes,resizeable=no,left=200,top=100,scrollbars=yes");


- for user 2
Code
var win=window.open("http://server_name/mail/user2.nsf\\(MSG)?OpenView" , "tw", "width=680,height=500,status=yes,resizeable=no,left=200,top=100,scrollbars=yes");

and so on....

how to get the server_name and the user1, user2 ,..... with JavaScript ?

Offline harkpabst_meliantrop

  • Senior Mitglied
  • ****
  • Beiträge: 463
  • Geschlecht: Männlich
  • I love!
    • Heute schon gelebt?
Re:how to open the mail file dynamically with JavaScript ?
« Antwort #1 am: 18.06.03 - 16:12:13 »
You can't do that with JS only.

As long as your code runs on the same server as the mail files are located, you could of course examin the history.location object, but still no way to determin the username.

The easiest way would be to combine JS an @Formulas. Write your JS as Pass-Through-HTML on a Form or page and insert compted text where you need to make calculations with @formulas.


Offline Toma Bogdan

  • Aktives Mitglied
  • ***
  • Beiträge: 146
  • Geschlecht: Männlich
  • That's me ...
    • A nice site !
something like this ?
« Antwort #2 am: 18.06.03 - 16:41:55 »


// In the JS Header.
function greetUser( strUserName ) {
alert( "Hello, " + strUserName + "!" );
}

REM "Formula code, behind a buton.";
@URLOpen( "javascript:greetUser( '" + @Name( [CN]; @UserName ) + "')" );

'LotusScript code, behind a button.
Sub Click(Source As Button)
Dim n_session As New NotesSession
Dim n_uiws As New NotesUIWorkspace

Call n_uiws.URLOpen( "javascript:greetUser( '" & n_session.CommonUserName & "')" )
End Sub

Offline Axel_Janssen

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 769
Re:how to open the mail file dynamically with JavaScript ?
« Antwort #3 am: 18.06.03 - 17:01:02 »
other variant is to use passThru html and computed text.

To call your function greetUser() in js header.

All as passThru Html (in text menu) and the @username as computed text (in create menu):

simply write in form.

Code
<input type="button" value="click me" onClick="greetUser(\"@username\")"/ >

this way you use formula language to dynamically write JavaScript when the form is requested by the browser.

In Html-Head field you can write whole JavaScript functions with Formula Language.
... design patterns are abstract designs that help identify the structure and elements involved in a specific design solution. From this, a concrete implementation can be produced.
Kyle Brown

 

Impressum Atnotes.de  -  Powered by Syslords Solutions  -  Datenschutz