Refresh on WebView

Post Reply
User avatar
Ari
Posts: 236
Joined: Fri Feb 03, 2006 4:21 pm
Location: São Paulo, SP - Brazil
Contact:

Refresh on WebView

Post by Ari »

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

* ========================================================================
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
CharlesKwon
Posts: 28
Joined: Sun Nov 02, 2014 7:03 am

Re: Refresh on WebView

Post by CharlesKwon »

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

* ========================================================================
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
Ari
Posts: 236
Joined: Fri Feb 03, 2006 4:21 pm
Location: São Paulo, SP - Brazil
Contact:

Re: Refresh on WebView

Post by Ari »

Ok,

:D

Grato.
Thanks,
Ari

FWH 2212 - Harbour 3.2.0 - Embarcadero 7.43 - MySQL
São Paulo - SP - Brasil
www.sisrev.com.br
Post Reply