View previous topic :: View next topic |
Author |
Message |
dgurok
Joined: 26 May 2011 Posts: 66
|
Posted: Tue Oct 02, 2018 1:06 pm Post subject: Plain hyperlink text |
|
|
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?
 |
|
Back to top |
|
 |
dgurok
Joined: 26 May 2011 Posts: 66
|
Posted: Tue Oct 02, 2018 3:12 pm Post subject: |
|
|
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? |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8217 Location: Salford, UK
|
Posted: Tue Oct 02, 2018 3:33 pm Post subject: |
|
|
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. |
|
Back to top |
|
 |
dgurok
Joined: 26 May 2011 Posts: 66
|
Posted: Tue Oct 02, 2018 3:44 pm Post subject: |
|
|
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. |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8217 Location: Salford, UK
|
Posted: Tue Oct 02, 2018 5:15 pm Post subject: |
|
|
It is described in the main help file under ClearWin+ > Format code reference >W >%wb.
Here is a simple example...
Code: | 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 |
|
|
Back to top |
|
 |
dgurok
Joined: 26 May 2011 Posts: 66
|
Posted: Thu Oct 04, 2018 9:57 am Post subject: |
|
|
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 |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8217 Location: Salford, UK
|
|
Back to top |
|
 |
Wilfried Linder
Joined: 14 Nov 2007 Posts: 314 Location: D�sseldorf, Germany
|
Posted: Thu Oct 04, 2018 5:26 pm Post subject: |
|
|
Have you already tried the subroutine use_url@ or the function internet_hyperlink? A small example:
Code: | 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 |
|
|
Back to top |
|
 |
|