Focal Point
[SOLVED] Create hyperlink using HTML Canvas

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5327067986

March 27, 2018, 08:44 AM
Shingles
[SOLVED] Create hyperlink using HTML Canvas
I can't believe I still can't figure this out. I've got a htm file that was created in HTML Canvas. It has all the filters. I want to add a hyperlink (like a regular
Help
link) to the top of the htm page.

I've tried to add a hyperlink (via the genereic elements panel) and modify the href property to have
http://www.yahoo.com
. I've tried the properties under the Hyperlink option, but I never got the desired results. The report show up with a link, but clicking it does nothing. However, if I right click it, and select open in a new tab, then it opens correctly, with the yahoo.com page.

I've also tried using the HTML button from the Objects panel, and in it I put
Help
. In HTML canvas it seems to look right (it looks like a hyperlink) but when I run the report, the Help text is just regular text. I can't click it or anything. And by the way... how does this control work exactly? I would love to be able to just add html to a page in HTML Canvas and I think this is how to do it, but it doesn't work as I expect.

I've explored using the Requets & Data Sources panel, but I don't think that's the right path. Just seems like too much to do for a stinking hyperlink!

I'm sure this can be done using Javascript, but that seems like overkill for something as simple as a hyperlink.

I'm sure I can open the htm file (created by HTML Canvas) in a text editor and modify the code, but I'm reluctant to do that in case I won't be able to open it in HTML canvas again.

Any tips here?

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8201, SP 0.1, Windows 7, HTML
March 27, 2018, 08:58 AM
MartinY
Steps :
1- From your Domain folder, right click on it and select New / URL
2- Add desired info for the URL : Title and URL
3- From HTML Composer / Request & Databases add new External Request / Url file and select previous step file
4- From HTML Composer insert new Components / Hyperlink
5- From HTML Composer / Task & Animations for your previous step Hyperlink component at Request/Actions add Run Request from your URL file added in 3

Hope that it's clear enough


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
March 27, 2018, 08:59 AM
JulieA
I'm not sure if this is what you need, but I just used the post below to create a hyperlink on an image in my portal.

http://forums.informationbuild...827019476#7827019476


WebFocus 8.2.04
WebFocus 8.2.04

March 27, 2018, 09:04 AM
Francis Mariani
Martin, this is not an insult to you, but I fell asleep after the second instruction!

URL... Request & Databases... External Request... Components... Task & animations... Hyperlink... Request/Actions... Run Request.

The wonders of the GUI will never cease.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
March 27, 2018, 09:21 AM
Shingles
Ok... that worked... thanks MartinY (and JulieA who provided a similar solution).

So... my follow up question. I don't really want to link to yahoo.com (that was just for testing). I am trying to link to an html file created outside of webfocus. Where should I save that file and what url should I use to link to it.

Be warned... this is a rant... I find the webfocus GUIs so unintuitive at times. Like, there is a control called hyperlink with a href property and it doesn't do use the href as a link (except when right clicking and opening it in a new tab which is even stranger). And all those steps for a link?!?!?

Thank you,


WebFOCUS 8201, SP 0.1, Windows 7, HTML
March 27, 2018, 09:55 AM
MartinY
@Francis
quote:

but I fell asleep after the second instruction!

URL... Request & Databases... External Request... Components... Task & animations... Hyperlink... Request/Actions... Run Request.

The wonders of the GUI will never cease.


Big Grin Good One

So many steps to perform one or two lines of code...


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
March 27, 2018, 10:02 AM
MartinY
@Shingles,

Your request to have an hyperlink to a file (not an URL) it's something totally different that can not be managed using the Hyperlink component (I've never been able to do so with that).

The way I found is to create a "report" which only contains the hyperlink that can easily be created from a COMPUTEd field.
Then include that report to your HTML page as a report component.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
March 27, 2018, 10:22 AM
Tony A
Hmm, this is nonsense and should work ... so I've tried it.

I found that there are spurious attributes given to the anchor object which, upon removal allow the hyperlink to work.

Again, this is a little ponderous but please stay with it (Francis Wink)

Within properties for the anchor object,


Then it worked for me .... tested in 8.2.01.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
March 27, 2018, 10:33 AM
Tony A
Ok, more weirdness - once I had one hyperlink working, adding another without changing anything worked as expected! Confused

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
March 27, 2018, 10:55 AM
MartinY
@Tony

OMG !!!
Another 5th Dimension miracle or damnation.....yours to choose Big Grin


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
March 27, 2018, 11:08 AM
Tony A
@Martin, I think that it's too late for damnation, although it depends upon which damned nation you mean Wink Razzer

T
March 27, 2018, 11:43 AM
CoolGuy
Tony, you're the best. Thanks for the share!

We are ALWAYS jQuerying it up at our site gutting IBI generated code & injecting our own to get things functioning the way we want it. Like I was saying in my other post, I don't even use AppStudio for such things if I can help it. It's just [silliness]. VSCode is the new AppStudio HTML tool of choice here. lol

Also, I wonder just how many less posts we'd have in these forums if they did a better job with their documentation, etc. Something to think about....


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
March 27, 2018, 01:38 PM
Shingles
quote:
Originally posted by MartinY:
@Shingles,

Your request to have an hyperlink to a file (not an URL) it's something totally different that can not be managed using the Hyperlink component (I've never been able to do so with that).

The way I found is to create a "report" which only contains the hyperlink that can easily be created from a COMPUTEd field.
Then include that report to your HTML page as a report component.


I got it to work. I saved the my htm file in inetpub, and then used ../file.htm as the source for the URL object.

Thanks all!


WebFOCUS 8201, SP 0.1, Windows 7, HTML
November 12, 2019, 05:48 AM
Darshan Patil
quote:
Originally posted by MartinY:
Steps :
1- From your Domain folder, right click on it and select New / URL
2- Add desired info for the URL : Title and URL
3- From HTML Composer / Request & Databases add new External Request / Url file and select previous step file
4- From HTML Composer insert new Components / Hyperlink
5- From HTML Composer / Task & Animations for your previous step Hyperlink component at Request/Actions add Run Request from your URL file added in 3

Hope that it's clear enough


Hi MartinY,
Can you please explain how we can pass the html form values in that URL.

Thanks
November 12, 2019, 08:55 AM
MartinY
This is not to pass a form to a hyperlink, this is to add a hyperlink to a form


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007