I iCAB Well-Known Member Licensed User Longtime User Jan 24, 2017 #1 Hi Guys Can someone tell me what is the proper way of loading a webpage (into a webview) returned as a result of successful HTTPPost ( I am hoping that I can use the same exact code with B4i) Here is what I have done so far, but it's not working properly Code: Copy Public Sub WebViewInvokeWithCredentials_JobDone( Job As HttpJob ) Try If Job.Success = True Then WVHints.LoadHtml( Job.GetString ) End If Catch End Try End Sub Thanks in advance
Hi Guys Can someone tell me what is the proper way of loading a webpage (into a webview) returned as a result of successful HTTPPost ( I am hoping that I can use the same exact code with B4i) Here is what I have done so far, but it's not working properly Code: Copy Public Sub WebViewInvokeWithCredentials_JobDone( Job As HttpJob ) Try If Job.Success = True Then WVHints.LoadHtml( Job.GetString ) End If Catch End Try End Sub Thanks in advance
Erel B4X founder Staff member Licensed User Longtime User Jan 24, 2017 #2 1. Remove the Try / Catch block. It will hide errors. 2. The sub name should be JobDone. Upvote 0
I iCAB Well-Known Member Licensed User Longtime User Jan 24, 2017 #3 Erel said: 1. Remove the Try / Catch block. It will hide errors. 2. The sub name should be JobDone. Click to expand... There is no issue with the sub being executed and no exception is generated. The only issue is that the page doesn't look as expected. In particular, 2 calendar controls get messed up. I believe that .GetString possibly stripping out some formatting characters (but I am not sure if this is the case) Thank you for your help Upvote 0
Erel said: 1. Remove the Try / Catch block. It will hide errors. 2. The sub name should be JobDone. Click to expand... There is no issue with the sub being executed and no exception is generated. The only issue is that the page doesn't look as expected. In particular, 2 calendar controls get messed up. I believe that .GetString possibly stripping out some formatting characters (but I am not sure if this is the case) Thank you for your help
Erel B4X founder Staff member Licensed User Longtime User Jan 24, 2017 #4 iCAB said: There is no issue with the sub being executed and no exception is generated. Click to expand... It is always important to post all the relevant information when you post a question. My guess is that you are missing one or more CSS files. However it is hard to say without seeing the value of Job.GetString. Upvote 0
iCAB said: There is no issue with the sub being executed and no exception is generated. Click to expand... It is always important to post all the relevant information when you post a question. My guess is that you are missing one or more CSS files. However it is hard to say without seeing the value of Job.GetString.
I iCAB Well-Known Member Licensed User Longtime User Jan 24, 2017 #5 Erel said: It is always important to post all the relevant information when you post a question. Click to expand... Hi Erel, thanks again for your reply Ok then, let me approach this differently I am trying to use POST (instead of GET) to validate and log a user to some back end system and allow the user to interact with the system from within a Webview. Using Get, all what I have to do is this: WebView1.LoadUrl( UrL?Email=SomeEmailAddress&Password=SomePassword ) I am trying to achieve the exact same result with POST. What would be the equivalent syntax using POST? Upvote 0
Erel said: It is always important to post all the relevant information when you post a question. Click to expand... Hi Erel, thanks again for your reply Ok then, let me approach this differently I am trying to use POST (instead of GET) to validate and log a user to some back end system and allow the user to interact with the system from within a Webview. Using Get, all what I have to do is this: WebView1.LoadUrl( UrL?Email=SomeEmailAddress&Password=SomePassword ) I am trying to achieve the exact same result with POST. What would be the equivalent syntax using POST?
Erel B4X founder Staff member Licensed User Longtime User Jan 24, 2017 #6 WebView.LoadURL will always send a GET request. It is exactly like entering a URL in the browser. Can you post the output of Log(Job.GetString)? Upvote 0
WebView.LoadURL will always send a GET request. It is exactly like entering a URL in the browser. Can you post the output of Log(Job.GetString)?
I iCAB Well-Known Member Licensed User Longtime User Jan 25, 2017 #7 Erel said: WebView.LoadURL will always send a GET request. It is exactly like entering a URL in the browser. Can you post the output of Log(Job.GetString)? Click to expand... I don't think the issue is related to GetString, most likely related to the return output. Thanks for your help Upvote 0
Erel said: WebView.LoadURL will always send a GET request. It is exactly like entering a URL in the browser. Can you post the output of Log(Job.GetString)? Click to expand... I don't think the issue is related to GetString, most likely related to the return output. Thanks for your help