Welcome Guest Search | Active Topics | Sign In | Register

Opening a second page in the background within a function applied on a single Webview with the windo Options
Prequena84
Posted: Monday, March 14, 2022 4:54:28 PM
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!
eo_support
Posted: Tuesday, March 15, 2022 3:37:34 AM
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
Prequena84
Posted: Tuesday, March 15, 2022 8:29:55 AM
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.
eo_support
Posted: Tuesday, March 15, 2022 4:04:56 PM
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.
Prequena84
Posted: Tuesday, March 15, 2022 4:16:06 PM
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
eo_support
Posted: Tuesday, March 15, 2022 4:22:38 PM
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_overloads

The "preloaded" WebView is not initially visible. However you can display it later wherever you want.

Thanks!
Prequena84
Posted: Tuesday, March 15, 2022 4:28:24 PM
Rank: Advanced Member
Groups: Member

Joined: 5/10/2021
Posts: 43
ok, it's preloaded, but can i access all the elements normally?
Prequena84
Posted: Tuesday, March 15, 2022 4:32:21 PM
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


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.