work-flow-Initiative

Historical information collectors portal, electronic museum

Language [ ENGLISH РУССКИЙ ]

Neighboring Topics


Developers

To developers...

Integration SpiderBasic and WFI

Date of publication: 2014-05-29 09:09:22
Views: 41323
Author:
Your application in SpiderBasic receives data from a completed form, sends them to the server ajax request and locates in Corresponding div container receiving the server response. 
Example of integration actually replaces comment form at the bottom of the page. 

Source code form.
Procedure HttpGetEvent(Success, result.s)
If Success
      Debug result
      ;!alert(v_result);    
      !document.getElementById('com_loader').innerHTML = v_result; 
Else
      Debug "HTTPRequest(): Error"
EndIf
EndProcedure
 
Global ListView1, Button1, Tree1
 
Procedure SizeWindowEvent()
    ResizeGadget(0, 10, 10, WindowWidth(0)-20, WindowHeight(0)-20)
EndProcedure
 
Procedure CloseWindowEvent()
    CloseWindow(EventWindow())
EndProcedure
 
Procedure GadgetEvents()
Select EventGadget()
Case 1
      DisableGadget(1,1)
      url$="act=com_add&com_nav=191&com_lang=2&com_item=&com_olp=integration spiderbasic and wfi&com_title="+GetGadgetText(2)+"&com_mail="+GetGadgetText(3)+"&com_name="+GetGadgetText(4)+"&com_msg="+GetGadgetText(5)+""
      HTTPRequest(#PB_HTTP_Post, "http://wfi.lomasm.ru/rus.main.ajax/", url$, @HttpGetEvent())       
EndSelect
EndProcedure
 
If OpenWindow(0, 0, 0, 420, 200, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget)
      SetWindowTitle(0, "SpiderBasic and WFI example of integration and interaction")
      
      StringGadget(2, 10,  10, 170, 20, "title...")
      StringGadget(3, 10,  40, 170, 20, "mail...")
      StringGadget(4, 10,  70, 170, 20, "name...")
      StringGadget(5, 10,  100, 170, 60, "text...")
      
      ButtonGadget(1, 10,  170, 200, 20, "SEND", #PB_Button_Left)
      
      BindEvent(#PB_Event_CloseWindow, @CloseWindowEvent())
      BindEvent(#PB_Event_SizeWindow, @SizeWindowEvent())
      BindEvent(#PB_Event_Gadget, @GadgetEvents())
      
EndIf



 
About \  О сайте
Article description: Integration SpiderBasic and WFI

Other articles of the section: Developers

NextOne Machine, Multiple Domains

Address page: link

Integration SpiderBasic and WFI Integration SpiderBasic and WFI