Link to home
Start Free TrialLog in
Avatar of varvoura
varvoura

asked on

Another web application clarification

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.

Regards,
Varvoura
SOLUTION
Avatar of madheeswar
madheeswar
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of varvoura
varvoura

ASKER

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.

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

Varvoura,
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...

-maddy
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
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
      excludeweekends=doc.excludeweekends(0)
      
      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
      
      i=0
      
      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
      Else
            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
      



ASKER CERTIFIED SOLUTION
Avatar of CRAK
CRAK
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
CRAK,
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,

-maddy
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
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...

Check this link for sample database and demo:
http://codestore.net/store.nsf/unid/FISR-6MEKTD

The above may help in starting.
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!