Refresh on WebView

Refresh on WebView

Postby Ari » Fri Aug 25, 2023 6:11 pm

Hello friends,

I'm using the WebView with DashBoard and I would like to refresh the page with F5 from the browse, but through a button, I tried to use it, and it has no effect on the button, if I click with the mouse and then press F5 ok, it works.

HB_KeyPut(VK_F5) :?

Code: Select all  Expand view  RUN

* ========================================================================
METHOD TaskBI() CLASS TVSisrevBI       /* botão de refresh F5 do Browse */
* ========================================================================
  local oGrpDash, oButDash
   
  TASKGROUP oGrpDash PROMPT "Dashboard" WATERMARK MARCA_DAGUA BITMAP "grafico"
         
  @ 4, 10 BTNBMP oButDash PROMPT "Atualizar" SIZE 120,35 LEFT ;
          RESOURCE "chart" 2007
         
  oButDash:bAction := {|| ::oFld:aDialogs[1]:SetFocus(),;
                          HB_KeyPut(VK_F5)             ,;
                          ::oFld:aDialogs[1]:refresh() }        
                     
  ENDTASKGROUP
 
return nil
 
Thanks,
Ari

FWH 2212 - Harbour 3.2.0 - Embarcadero 7.43 - MySQL
São Paulo - SP - Brasil
www.sisrev.com.br
User avatar
Ari
 
Posts: 234
Joined: Fri Feb 03, 2006 4:21 pm
Location: São Paulo, SP - Brazil

Re: Refresh on WebView

Postby CharlesKwon » Sat Aug 26, 2023 12:44 am

Ari.

It seems you are having difficulty with the page refresh in Webview.
There are various ways to refresh a page, not just using mouse macros. There's a more reliable method.

Try passing the following script to the Webview through the EVAL Method:

oWebView:EVAL( "location.reload();" )

Regards,
Chalres KWON


Ari wrote:Hello friends,

I'm using the WebView with DashBoard and I would like to refresh the page with F5 from the browse, but through a button, I tried to use it, and it has no effect on the button, if I click with the mouse and then press F5 ok, it works.

HB_KeyPut(VK_F5) :?

Code: Select all  Expand view  RUN

* ========================================================================
METHOD TaskBI() CLASS TVSisrevBI       /* botão de refresh F5 do Browse */
* ========================================================================
  local oGrpDash, oButDash
   
  TASKGROUP oGrpDash PROMPT "Dashboard" WATERMARK MARCA_DAGUA BITMAP "grafico"
         
  @ 4, 10 BTNBMP oButDash PROMPT "Atualizar" SIZE 120,35 LEFT ;
          RESOURCE "chart" 2007
         
  oButDash:bAction := {|| ::oFld:aDialogs[1]:SetFocus(),;
                          HB_KeyPut(VK_F5)             ,;
                          ::oFld:aDialogs[1]:refresh() }        
                     
  ENDTASKGROUP
 
return nil
 
User avatar
CharlesKwon
 
Posts: 28
Joined: Sun Nov 02, 2014 7:03 am

Re: Refresh on WebView

Postby Ari » Sat Aug 26, 2023 11:26 am

Ok,

:D

Grato.
Thanks,
Ari

FWH 2212 - Harbour 3.2.0 - Embarcadero 7.43 - MySQL
São Paulo - SP - Brasil
www.sisrev.com.br
User avatar
Ari
 
Posts: 234
Joined: Fri Feb 03, 2006 4:21 pm
Location: São Paulo, SP - Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 73 guests