Another web application clarification

Posted on 2006-07-05
Medium Priority
Last Modified: 2013-12-18
Hi there,

I am trying to use a notes client application on the web and i am having a problem using the drag and drop facility which works perfectly fine in the notes client.
I know that lotusscript doesn't work on the web but it would work if I placed it in the QueryWebOpen and OpenAgent and & QueryWebClose, but how can this be applicable to the lotusscript PostDragDrop code which I have in my notes calendar.
How can I make this same code work in my web application so that I am able to change appointments by drag & drop same as notes client.

This is an urgent matter so your help with this is quite appreciated.

Question by:varvoura
  • 5
  • 5
  • 2
LVL 19

Assisted Solution

madheeswar earned 1000 total points
ID: 17040759
This is not so easy to do on web....
In codestore.net, I found one application  on web, which uses Drag & Drop. May be you can take a look at have some idea.

Author Comment

ID: 17040846
I'll take a look but i may need some more help with this.
I'll let you know and thanks for your prompt response.


Author Comment

ID: 17040945
I am talking about the notes calendar, draging and dropping of appointment from one time slot to another

Have you got the correct link to this, I can't seem to find it on codestore.net

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

LVL 19

Expert Comment

ID: 17041003
As I rightly said, in the sample database, it demonstartes on how to drag and drop response docs on web. It is not related to calendar. I am sure, this is somewhat complex.

If you get that sample database, you can see the logic. The key in that application is to get the doc id and sort it. Similarly, once you get handle to the doc id, in the backend, you can run agent based on Doc id and process it. This entire logic is very complex. If you get a chance, look into iNotes. Check how they are handling Calendar entries. Ofcourse, if iNotes is not providing drag and drop, forget about this.

Lets wait for other experts...


Author Comment

ID: 17041051
But I am looking for sorting, I am looking for the ability to drag or schedules from one time slot to another, the same way I do this in notes calendar.

OK, hope someone else has an idea about this function, unfortunately it is a must for this project that I am working on.

Thanks maddy for your idea, I am greatful

Author Comment

ID: 17041679
Hi experts, maybe this will help you to better understand what I am trying to achieve.
This is the script that's working in the client. I want to be able to use the exact same thing on the web, is this possible, or am I just beating my head to a brick wall?

 Dim session As New NotesSession
      Dim db As notesdatabase
      Set db = session.currentdatabase
      Dim uiw As New NotesUIWorkspace
      Dim uidoc As NotesUIDocument
      Set uidoc = uiw.CurrentDocument
      Dim doc As NotesDocument
      Set doc = db.GetDocumentByID( source.CaretNoteID )
      Dim fromList As Variant
      Dim tmpList As Variant
      Dim toList As Variant
      Dim oldList() As String
      Dim newList ()As Variant
      SelectedDate = uiw.CurrentCalendarDateTime
      fromDate = Cstr( Datevalue(uiw.CurrentCalendarDateTime ) )    
      toDate = Cstr( source.CalendarDateTime )
      fromDate = Left( fromDate, Len( fromDate) )
      Dim excludeweekends As String
      If excludeweekends = "Yes" Then
            If Weekday(toDate) = 1 Or Weekday(toDate) = 7 Then
                  Msgbox |You can't move this test to the weekend because you have selected to exclude weekends on the Client Record.  Please select another day| , _
                  MB_ICONINFORMATION, "Can't schedule tests on the weekend"
                  Exit Sub
            End If      
      End If
      toDate = Left( toDate, Len( toDate ))
      Dim date3 As Variant
      date3 = Cdat(todate) - Cdat(fromdate)
      tmpList =doc.projdates
      Forall x In tmpList
            Redim Preserve oldList(i)
            oldList(i) = Format$(x, "Short Date")
            i = i + 1
      End Forall
      fromList = MakeArray( fromDate )
      toList = MakeArray( toDate )
      Dim askme As Integer
      askme = uiw.Prompt (PROMPT_YESNO, _
      "Test Schedule", "Would you like to move all future test schedule for this product ?")
      Dim newlist1 As Variant
      If askme=1 Then
            newlist1 = oldlist
            i = 0
            Forall x In newList1
                  Redim Preserve newlist(i)
                  newlist(i) = Cdat(x) + date3
                  i = i+1
            End Forall
            newList1 = Arrayreplace(oldList, fromList, toList )
            i = 0
            Forall x In newList1
                  Redim Preserve newlist(i)
                  newlist(i) = Cdat(x)
                  i = i+1
            End Forall
      End If
      doc.projdates= newList
      doc.testdates = newlist
      Call doc.Save( True, True, True )
      Call uiw.ViewRefresh

LVL 13

Accepted Solution

CRAK earned 1000 total points
ID: 17042306

You wrote "I know that lotusscript doesn't work on the web but it would work if I placed it in the QueryWebOpen and OpenAgent and & QueryWebClose".
Have you figured out why lotusscript doesn't work on the web? And in relation to that: what kind of event "PostDragDrop" is?

Lotusscript is code that can ONLY be executed by (besides Lotus Smartsuite applications) Lotus Notes clients and Lotus Domino Servers! NOT by browsers!
WebQueryOpen is an event occuring on the server: the webclient has sent a request for a certain webpage to the server and just before this request is served, the server is able to execute code. The browser at that time hasn't got a clue of what went on!

Then there is a drag and drop event. Typically a client-side event, as it is the user dragging and dropping things!
In Notes applications it would be the Notes client handling such events, and in web applications..... we only have the browser, without the help of lotusscript.
The server will have no idea of what's going on in the webclient, unless a document is either requested of submitted. It's in a different world: it can't help you evaluate the drag and drop event, no matter how hard you back your head agains the wall!

I don't know how madheeswar's solution tackles this challenge, perhaps something in java, but obviously he, as an expert, considers it to be your best option! Wether it describes dragging a document to another parent document or dragging an appointment to another date: getting hold of "what", "where" and "when" should be pretty much the same!

I see only one other option: http://www.experts-exchange.com/help.jsp#hi54
LVL 19

Expert Comment

ID: 17042373
You are right almost.

But there is a database in Codestore.net which handles drag and drop  of child documents and it sorts underneath the parent. I also got amazed by the way its designed.

The above is achieved through AJAX..... like XML and XSLT. Using AJAX you can handle Client side and send request to server within seconds and get results in a flash. May be you can explore towards AJAX. It is highly efficient and you can't belive what are the things it can handle. Its really a gift to Domino users.
I am sure you should have come across AJAX. If you would have used XMLHTTPrequest, it is one of the parameter in AJAX.
Jake has really explored a lot and we have few sample databases available in Codestore.net and openntf.org.

Hope the above helps. Still I am sure, the drag and drop of calendar events is very difficult to achieve.
I am NOT telling it cannot be done. Based on the sample database available in codestore.net, I made this conclusion.
If I am wrong, please correct me.
Thank you,


Author Comment

ID: 17042453
Thank you both, CRAK thanks for your explanation but I am not sure how you want me to use your link(my apologies, i am not being silly here, do you mean to say that I should revise policies of question posting)?

Maddy, I know that you're also trying your best to help, but I am no AJAX expert and I am still learning the ropes that's why I found going to your first solution a bit hard + my manager wants this silly Calendar thing to work on the web the same way it works on the notes client(and please don't tell me to tell him to do this himself because he'll  have a NOT too nice answer for this)

I had a look in the mail template before posting to see if iNotes did have such functionality, but I couldn't see this happening anywhere.

Thank you both but I seriously am still not sure what to do
LVL 19

Expert Comment

ID: 17042569
Please inform your manager:
"You cannot achieve what Notes does on WEB. Both are different."

Even I am not an AJAX expert to give code or examples. After seeing that application I analyzed, it MAY work. There is a possibility it may not work also.
What CRAK meant is to close the question if you can't get the solution. Right CRAK...

LVL 19

Expert Comment

ID: 17042640
Check this link for sample database and demo:

The above may help in starting.
LVL 13

Expert Comment

ID: 17045134
That link was only referring to a paragraph in EE's help page explaining that sometimes things just can't be done.
I could have written down that exact phrase, but I didn't want to cross the line between "I'm positive that it can't be done" and "I think it can't be done" as there is so much technology that, with a lot of fiddling around and fooling domino, could very well do just that trick!
Parhaps AJAX.... yes, heard of it, but no I don't know it.... it's still on that long "to do" list of mine!

I do hope your manager will understand and is willing to work with you an anternative!

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Watch the video to learn how one can deal with PST file corruption issue with an outstanding Kernel for Outlook PST Repair Tool easily. Using this tool, non-technical users can swiftly perform the repair process to restore their essential data witho…

601 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