Read showToastMessage functions messages in TWebView??

Read showToastMessage functions messages in TWebView??

Postby Horizon » Tue Aug 02, 2022 9:20 pm

Hi Antonio,

Is it possible to read messages from showToastMessage function?

Code: Select all  Expand view
showToastMessage("Warning","There is a something error (ERR10001) !","error");


Thanks.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Read showToastMessage functions messages in TWebView??

Postby Antonio Linares » Wed Aug 03, 2022 4:21 am

Dear Hakan,

If showToastMessage() is a javascript function available from your HTML, then you should be able to execute it using:

oWebView:Eval( 'showToastMessage("Warning","There is a something error (ERR10001) !","error")' )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Read showToastMessage functions messages in TWebView??

Postby Horizon » Wed Aug 03, 2022 5:55 am

Antonio Linares wrote:Dear Hakan,

If showToastMessage() is a javascript function available from your HTML, then you should be able to execute it using:

oWebView:Eval( 'showToastMessage("Warning","There is a something error (ERR10001) !","error")' )


Hi Antonio,

Yes, it is. it can run in console mode. My goal is reading "There is a something error (ERR10001)!" text from message.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Read showToastMessage functions messages in TWebView??

Postby Antonio Linares » Wed Aug 03, 2022 7:36 am

You can use javascript alert() or console.log()
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 66 guests

cron