bogdanc Active Member Licensed User Longtime User Feb 6, 2016 #1 Hi All! I used a webview to open my external web. that web has continuously updating (Ajax / js ) some variables. These variables are kept in the array. How to get access to them? Is there any simplest way instead of use a webview. Thanks for any ideas.
Hi All! I used a webview to open my external web. that web has continuously updating (Ajax / js ) some variables. These variables are kept in the array. How to get access to them? Is there any simplest way instead of use a webview. Thanks for any ideas.
eurojam Well-Known Member Licensed User Longtime User Feb 6, 2016 #2 you asked a similar question already in b4j forum. I suppose the answer will be the same like Erel gave you some days before... Upvote 0
you asked a similar question already in b4j forum. I suppose the answer will be the same like Erel gave you some days before...
bogdanc Active Member Licensed User Longtime User Feb 6, 2016 #3 eurojam said: you asked a similar question already in b4j forum. I suppose the answer will be the same like Erel gave you some days before... Click to expand... Yes was similar but This time is about variable value kept in the array. How to get access to it? Upvote 0
eurojam said: you asked a similar question already in b4j forum. I suppose the answer will be the same like Erel gave you some days before... Click to expand... Yes was similar but This time is about variable value kept in the array. How to get access to it?
Erel B4X founder Staff member Licensed User Longtime User Feb 7, 2016 #4 You will need to inject JavaScript that reads the array. A better solution will be to remove WebView and use HttpUtils2 to make the requests. Upvote 0
You will need to inject JavaScript that reads the array. A better solution will be to remove WebView and use HttpUtils2 to make the requests.
bogdanc Active Member Licensed User Longtime User Feb 7, 2016 #5 Erel said: You will need to inject JavaScript that reads the array. A better solution will be to remove WebView and use HttpUtils2 to make the requests. Click to expand... Hi Erel! I did some simple example: HTML: <!DOCTYPE html> <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script> var test = ["element1", "element2", "element3"]; </script> <body> </body> </html> Then I used a tutorial of: HttpUtils2 But id downloading is as plain text. So how in this method request access to array? Upvote 0
Erel said: You will need to inject JavaScript that reads the array. A better solution will be to remove WebView and use HttpUtils2 to make the requests. Click to expand... Hi Erel! I did some simple example: HTML: <!DOCTYPE html> <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script> var test = ["element1", "element2", "element3"]; </script> <body> </body> </html> Then I used a tutorial of: HttpUtils2 But id downloading is as plain text. So how in this method request access to array?
Erel B4X founder Staff member Licensed User Longtime User Feb 7, 2016 #6 You will need to parse it the html. This regex pattern will return the text inside the square brackets: \[([^]]+)\] You can then split it and remove spaces and quotes to get the elements. Upvote 0
You will need to parse it the html. This regex pattern will return the text inside the square brackets: \[([^]]+)\] You can then split it and remove spaces and quotes to get the elements.
bogdanc Active Member Licensed User Longtime User Feb 7, 2016 #7 Erel said: You will need to parse it the html. This regex pattern will return the text inside the square brackets: \[([^]]+)\] You can then split it and remove spaces and quotes to get the elements. Click to expand... I understand but an array its dymamicly updated. So I will need to gor example: Array: test[0] to get this element Upvote 0
Erel said: You will need to parse it the html. This regex pattern will return the text inside the square brackets: \[([^]]+)\] You can then split it and remove spaces and quotes to get the elements. Click to expand... I understand but an array its dymamicly updated. So I will need to gor example: Array: test[0] to get this element
Erel B4X founder Staff member Licensed User Longtime User Feb 7, 2016 #8 It can only be updated if you make a new request. Upvote 0