Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-08-31
6
Medium Priority
?
198 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
  • 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
Industry Leaders: 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 600 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

926 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