Solved

Simple - editing a action button to show up on the web

Posted on 2004-08-31
6
194 Views
Last Modified: 2013-12-18
On my client side database, I have a action button placed with in a table.  The action itself is a lotus script.  I need for the action button to now show up on the web side as well.  I think it has something to do with the HTML tags - not sure
0
Comment
Question by:Jaziar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 31

Expert Comment

by:qwaletee
ID: 11945789
LotusScript buttons don't work on the web.  You'll have to convert it to work differently.  What does the button do?
0
 

Author Comment

by:Jaziar
ID: 11946090
Sub Click(Source As Button)
      Dim session As New NotesSession
      Dim uiDoc As notesUiDocument
      
      Dim doc As NotesDocument, dialog As NotesDocument
      Dim ws As New NotesUIWorkspace
      Dim s As New NotesSession
      Dim db As NotesDatabase
      Set db = session.CUrrentDatabase
      Set dialog = db.CreateDocument
      Set uiDoc = ws.currentDocument    
      flag = ws.DialogBox( "Disc", 1,1, 0, 1, 1, 0, "title", dialog)
      If Not flag Then Exit Sub
      
      Dim comment As String
      Dim recipient As Variant      
      comment = dialog.DiscComment(0)
      recipient = dialog.DiscSendTo(0)
      Dim message As notesDocument
      Set message = db.createDocument
      message.Form = "Memo"
      message.Subject = "Discussion Thread from database " & db.Title & " - SPR Number " & uidoc.Document.LexECRNum(0)
      Dim rtitem As notesrichtextitem
      Set rtitem = message.createrichtextitem( "Body" )
      
      Call rtitem.AppendDocLink( uidoc.document , "link to document" )
      Call rtitem.AddNewLine(2)
      Call rtitem.AppendText( COMMENT )
      message.SendTo = dialog.DiscSendTo
      message.Send False
      
      Set uidoc = ws.currentDocument
      Dim Discussion As String
      Dim history As NotesItem
      Set history = uidoc.document.getfirstitem( "Discussion" )
      If history Is Nothing Then
            Set history = uidoc.document.replaceitemvalue( "Discussion" , Now & " From " & s.commonuserName & Chr$(13) )
      Else
            history.AppendToTextList Now & " From " & s.commonuserName & Chr$(13)
      End If
      history.AppendToTextList "------------------------------------------------------" & Chr$(13)
      history.AppendToTextList COMMENT & Chr$(13)
      history.AppendToTextList "======================================================" & Chr$(13)
      
' save it in the backend, but update changes
      Call uidoc.document.save(True,True)
      Call uidoc.reload()
      
End Sub
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 11946456
Jaziar, I didn't really want all the code, just a fnctional description!

It looks like your button pops up a UI to send a message.  What you will want to do is adapt the "Disc" form so that it can display on the web, and so that when it is submitted from the web, it sends an e-Mail.  The button will have to have two versions, one for Notes, one for the web.  The web version should launch the Disc form in a new browser window, perhaps passing enough info to it so that it knows where it was called from.

That's the conversion for the first part of the LS button.

The second part appends the user name, time, and comment text to the main document.  To take care of that, you can handle it one of several ways:

1) If the history field is editable, then the Disc popup can use a bit of Javascript to pass the comment back to the editable field of the parent window

2) If it is not...

    2a) instead of calling the comment in a pop-up window, have the main window submit with a hidden flag field.  The query save for the form can recognize the flag, and redirect the user after save to the ocmments form, and teh comments form processing on submit can both send the message and update the original document's history field

    2b) you can add an editable field that is hidden from Notes and uses teh wbe attribute TYPE=HIDDEN, to hold the tenporary comments.  Then, as in (1), the commen form before submitting passes the comment back... to this hidden field.  Upon submission of the main form, the ocntent of the hidden field is appended tp the main hostory field, and the temporary field is cleared.

And you thought this would be simple?!
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Jaziar
ID: 11952676
I was sure wrong about this one.
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 150 total points
ID: 11957106
You know what?  You could build a much simpler interface for the web.  Just put in an editable field on the main form to type in the comments.  The button will just unhide the field.  Your web query save agent will just move the content from the input field to the history field, send the message, and clear the input field.
0
 

Author Comment

by:Jaziar
ID: 11957576
sounds like a plan - I will give it a try
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question