FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour webview questions
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM

webview questions

Posted: Sun Mar 30, 2025 09:02 PM
I wish ask

if I can no show the menu when I click on html as



I can use the command
:InjectJavascript( "document.addEventListener('contextmenu', function(e) { if (e.target.tagName !== 'A') { e.preventDefault(); } });" )
and seems run ok obviously it is set so that if the mouse clicks on a link it executes it without problems


For ugrade html
is there a comand or I must call allways the command oApp():oDashboard:SetHtml( Html() )
or I can simulate ctrl+R ? as there is on menu ?
I can use f5 or
:InjectJavascript( "document.addEventListener('keydown', function(e) { if (e.key === 'F5') { e.preventDefault(); window.location.reload(); } }); function refreshPage() { window.location.reload(); } document.addEventListener('DOMContentLoaded', function() { var refreshAreas = document.getElementsByClassName('refresh-area'); for (var i = 0; i < refreshAreas.length; i++) { refreshAreas[i].addEventListener('click', function() { refreshPage(); }); } });" )
any suggestions ?

SetUserAgent( cUserAgent )

How use this ? is there a sample test ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM

Re: webview questions

Posted: Mon Mar 31, 2025 12:13 AM
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM

Re: webview questions

Posted: Mon Mar 31, 2025 08:19 PM
cnavarro wrote: SetUserAgent

Look this topic
https://forums.fivetechsupport.com/viewtopic.php?p=278605#p278605
Cris 驴qu茅 deber铆a hacer este agente? 驴Cual es su funci贸n?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM

Re: webview questions

Posted: Mon Mar 31, 2025 11:42 PM
Silvio, te remito a la documentacion oficial, pero en algunos casos es muy util
https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent
El User-Agent es un encabezado HTTP que los navegadores (u otros clientes HTTP) env铆an al servidor web para identificar el dispositivo, sistema operativo, navegador y versi贸n que est谩 realizando la solicitud. Este encabezado permite que el servidor adapte su respuesta seg煤n las capacidades del cliente.
Gracias al encabezado que se envia con el user-agent puedes determinar el comportamiento de la aplicacion, son muchas las utilidades que tiene.
The User-Agent is an HTTP header that browsers (or other HTTP clients) send to the web server to identify the device, operating system, browser, and version making the request. This header allows the server to tailor its response based on the client's capabilities.
Thanks to the header sent with the user-agent, you can determine the application's behavior, and it has many uses.
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM

Re: webview questions

Posted: Thu Apr 03, 2025 07:15 AM
cnavarro wrote: Silvio, te remito a la documentacion oficial, pero en algunos casos es muy util
https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent
El User-Agent es un encabezado HTTP que los navegadores (u otros clientes HTTP) env铆an al servidor web para identificar el dispositivo, sistema operativo, navegador y versi贸n que est谩 realizando la solicitud. Este encabezado permite que el servidor adapte su respuesta seg煤n las capacidades del cliente.
Gracias al encabezado que se envia con el user-agent puedes determinar el comportamiento de la aplicacion, son muchas las utilidades que tiene.
The User-Agent is an HTTP header that browsers (or other HTTP clients) send to the web server to identify the device, operating system, browser, and version making the request. This header allows the server to tailor its response based on the client's capabilities.
Thanks to the header sent with the user-agent, you can determine the application's behavior, and it has many uses.
for an application dashboard not need it
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM

Re: webview questions

Posted: Thu Apr 03, 2025 09:40 AM

I have only used it if there is a reason and objective for it and if you are going to analyze the content of it

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces

Continue the discussion