Mashiane Expert Licensed User Longtime User Mar 4, 2022 #1 Hi there Following on the BANano Essentials Ebook, my BrowserIndex and ServerIndex code has been updated to use ws.B4JSend. For example, in my BrowserIndex, I have Code: ... ws.B4JSend("DirectMySQLOnServer_BAN", payload) ... and inside the ServerIndex.DirectMySQLOnServer_BAN sub, I am calling db related functions. For example.. Code: ... Dim doit As ResumableSub = dDB.SQLRunQuery(query, args) Wait For(doit) Complete (Result As Boolean) ... My code is working very well, however I just need to confirm if what Im doing is not abnormal and might cause unexpected bahaviour. Thanks in advance.
Hi there Following on the BANano Essentials Ebook, my BrowserIndex and ServerIndex code has been updated to use ws.B4JSend. For example, in my BrowserIndex, I have Code: ... ws.B4JSend("DirectMySQLOnServer_BAN", payload) ... and inside the ServerIndex.DirectMySQLOnServer_BAN sub, I am calling db related functions. For example.. Code: ... Dim doit As ResumableSub = dDB.SQLRunQuery(query, args) Wait For(doit) Complete (Result As Boolean) ... My code is working very well, however I just need to confirm if what Im doing is not abnormal and might cause unexpected bahaviour. Thanks in advance.
nedium Active Member Licensed User Longtime User May 30, 2022 #2 Hi, I'm trying to connect 'BROWSERTemplate' with 'SERVERTemplate' but I can't find what works, I don't know if I'm leaving something out. Thanks Upvote 0
Hi, I'm trying to connect 'BROWSERTemplate' with 'SERVERTemplate' but I can't find what works, I don't know if I'm leaving something out. Thanks
alwaysbusy Expert Licensed User Longtime User May 30, 2022 #3 nedium said: I don't know if I'm leaving something out. Click to expand... Hard to tell without seeing your code Upvote 0
nedium said: I don't know if I'm leaving something out. Click to expand... Hard to tell without seeing your code
nedium Active Member Licensed User Longtime User May 30, 2022 #4 Code: ws.B4JSend("Suma_BAN", CreateMap("counter": 5)) -------------- Code: Public Sub dato(ss As Int) WelcomeModalMessage.Text = "suma " & ss WelcomeModal.Open End Sub ------------------- Code: public Sub Suma_BAN(params As Map) Dim n1 As Int = params.Get("counter") Dim suma As Int = n1 + 10 ws.RunFunctionWithResult("dato",Array(suma)) ws.Flush End Sub ----------------------------------------------- I don't know if I'm doing things right, I'm really trying to find a way to communicate both sides and then include other methods and show results on the page. Thank you very much for the help Upvote 0
Code: ws.B4JSend("Suma_BAN", CreateMap("counter": 5)) -------------- Code: Public Sub dato(ss As Int) WelcomeModalMessage.Text = "suma " & ss WelcomeModal.Open End Sub ------------------- Code: public Sub Suma_BAN(params As Map) Dim n1 As Int = params.Get("counter") Dim suma As Int = n1 + 10 ws.RunFunctionWithResult("dato",Array(suma)) ws.Flush End Sub ----------------------------------------------- I don't know if I'm doing things right, I'm really trying to find a way to communicate both sides and then include other methods and show results on the page. Thank you very much for the help
alwaysbusy Expert Licensed User Longtime User May 30, 2022 #5 Do you get errors, either in the B4J log or in the Browsers console (F12)? I tried your code and I got the dialog popping up: Upvote 0
Do you get errors, either in the B4J log or in the Browsers console (F12)? I tried your code and I got the dialog popping up:
nedium Active Member Licensed User Longtime User May 30, 2022 #6 Hi, Yes, you are right, I had an error in the console, it was pointing to another port, I am going to do tests to practice how to show data from the server to the page, if I have any other questions I will ask. thank you very much for your help Upvote 0
Hi, Yes, you are right, I had an error in the console, it was pointing to another port, I am going to do tests to practice how to show data from the server to the page, if I have any other questions I will ask. thank you very much for your help