Silverfrost Forums

Welcome to our forums

Plain hyperlink text

2 Oct 2018 12:06 #22613

I want to use a plain hyperlink text in WINIO like a hyperlink is displayed in general. I don't want to use the button solution. Is there another possibility to do this? %ht creates an own htm area which can not be combined with other controls in that window? Is that correct?

https://i.imgur.com/NpYqnTj.png

2 Oct 2018 2:12 #22614

I have a workaround with using %ht. In my document I use the <a href=''> tag to refer to a url. If I click on the link, in my browser a part of the url is in upper case. The upper case url is not valid. Is this a bug?

2 Oct 2018 2:33 #22615

It might be better to use %wb. I am not sure. It is a while since I last used it.

URLs might well be case-sensitive.

2 Oct 2018 2:44 #22616

I dont know the functionality of %wb. Where is it described?

I have created a html document for using %ht. In this document the url is correct, everthing is in lower case. If I click in WINIO on this link, the url is used in upper case. That's strange for me.

2 Oct 2018 4:15 #22617

It is described in the main help file under ClearWin+ > Format code reference >W >%wb.

Here is a simple example...

program WebPage
 use clrwin
 integer iw
 integer,external::cbForum,cbWeb 
 iw=winio@('%ww[no_border]%ca[New HTML]&') 
 iw=winio@('%pm[Back,Forward,History,Copy,Forum]&', & 
      & 'wbGoBack', 'wbGoForward', 'wbHistory', 'wbCopy', cbForum)
 iw=winio@('%pv%60.30^wb[http://www.silverfrost.com]', cbWeb)
end

integer function cbForum() 
 use clrwin
 integer r
 r = wbCommand@('http://forums.silverfrost.com')
 cbForum = 2
end function

integer function cbWeb()
 use clrwin
 character(len=256)::reason,url
 reason = clearwin_string@('CALLBACK_REASON')
 url = clearwin_string@('CURRENT_URL')
 print*, reason(1:len_trim(reason)), ' = ', url(1:len_trim(url))
 cbWeb = 2
end function
4 Oct 2018 8:57 #22622

The fuction must be new because in my version (7.10.0) %wb is not described.

In my very simple htm file, I'm using some hyptertexts, e.g.

<a href='https://cloud.google.com/maps-platform/'>Google Maps Platform</a>

If I use it with %wb, the link will be opened in WINIO and the homepage is not displayed correctly. This is not what I want to do. I want that the link will be opened in default browser.

If I use it with %ht, everything looks good but when I click on the link, my browser (chrome) opens the link as: https://cloud.google.com/MAPS-PLATFORM/ Don't know why it changed to upper case.

If I test my htm file without WINIO, the link looks good. No changes to upper case.

Some other links are okay, but I don't know why it happens on https://cloud.google.com

4 Oct 2018 10:49 #22623

If you have a recent version of salflibc.dll (or clearwin64.dll for 64 bits) then you will be able to use %wb. The online help is here...

https://silverfrost.com/ftn95-help/clearwinp/formats/_wb.aspx

4 Oct 2018 4:26 #22625

Have you already tried the subroutine use_url@ or the function internet_hyperlink? A small example:

      winapp      
      program test

      include <windows.ins>
      
      character*200  string

      string = 'https://cloud.google.com/maps-platform'

c      call use_url@(string)  ! ... or:

      i = winio@('%^bt[Test]','INTERNET_HYPERLINK',string)
      end
Please login to reply.