|
Rank: Advanced Member Groups: Member
Joined: 5/10/2021 Posts: 43
|
Hello good morning, I am doing a development that involves opening several web pages and doing a javascript function and I am doing it from Webview directly 1 to 1 and it turns out that it takes too long and consumes a lot of resources every time a new page is opened.
I was thinking to include a new function inside the Webview that executes all the functions a function that uses a resource like windows.open() in javascript and see if I can open a web that through For can execute another function in several pages while it is running the same function in the Webview, is it possible to realize this idea? Or how do you advise me to develop this idea from theory?
I would appreciate any clue you can give me and I will investigate the rest!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
I am not exactly sure if I understand your question correctly. If you have multiple WebView objects and you wish to run JavaScript in each WebView at the same time, you can use WebView.QueueScriptCall. This will allow you to send JavaScript code to each WebView and have them running in parallel.
Please feel free to let us know if you still have any questions.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 5/10/2021 Posts: 43
|
I already solved it, it was to open a new window from a function with windows.open and call another function to click everything in the same function, what I did was define a variable that is the new open Windows and in that execute the function, Now I have 2 doubts how can I create the Webview in the background? and the other, how can I connect my Webview to my Access database directly to send data or make queries.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
What do you mean by creating WebView in the background?
WebView does not connect to your access database directly. WebView loads a web page. The page can then send request to your web server. Your web server can then do whatever you want, such as accessing your database. In another word, WebView is the client part. Accessing your database is the server part.
|
|
Rank: Advanced Member Groups: Member
Joined: 5/10/2021 Posts: 43
|
I already solved it I was able to connect my Webview to a Access database through a function that I have invented and what I have been studying worked, what I want to try to do is create an object and in the host the Webview that I have created with the Window .open the idea is to reduce resource consumption by having an invisible Webview in the background, that will help me reduce resource consumption when activating a Webview a picturebox
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi, You can do that with this function: https://www.essentialobjects.com/doc/eo.webbrowser.webview.preload_overloadsThe "preloaded" WebView is not initially visible. However you can display it later wherever you want. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 5/10/2021 Posts: 43
|
ok, it's preloaded, but can i access all the elements normally?
|
|
Rank: Advanced Member Groups: Member
Joined: 5/10/2021 Posts: 43
|
With this I think we are like that I can attend to my client with this update that I am doing to your app, thanks
|
|