Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Change color of hyper links selectively for one row ?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Change color of hyper links selectively for one row ?
 Login/Join
 
Gold member
posted
I have a focus procedure generating HTML. I need the background of the data cells of the summary row as blue. The hyperlinks in that row are no more visible (cause they are also blue). Is there any way I can selectively turn the links as white in that row (using webfocus stylesheet) ?


WebFOCUS 5.3.3 MRE - Solaris - Sun Web Server - Weblogic
 
Posts: 85 | Registered: December 20, 2005Report This Post
Expert
posted Hide Post
Govind, my original post apparently made a mess of the board, since it had html tags in it... so sorry.
My thinking is that it won't work.
In a focus style sheet, you can apply a CLASS, but not to the drilldown, just to the TD.
We need a way to apply a CLASS to the FOCEXEC= part of the drilldown.
so a work-around is to define your own drilldown...
MYDRILL/A100='<A HREF= ... >' | MYVAR | '</A>';

and apply your own styling directly to the A tag.

If there is a way to apply a CLASS to the Anchor Tag of a drilldown.. perhaps someone will come along and tell us.

otherwise, in the style section of your htmlform
you can choose a single set of colors and features for all anchor tags that will work for all bg colors;
-HTMLFORM BEGIN
<HEAD>
<style>
A {color:#999999; text-decoration:underline}
a:hover, a:active{ color:#6699cc; text-decoration:underline}
</style>
...etc

This message has been edited. Last edited by: susannah,




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Gold member
posted Hide Post
I dont suppose there is a way to bundle the whole FOCEXEC URL with all its parameters into the TD cell .....

COMPUTE MYDRILL/A100 = 'FOCEXEC' .....

Perhaps some javascript ? In absence of these, I guess I will settle down for a single set of colors for all links. Thanks.


WebFOCUS 5.3.3 MRE - Solaris - Sun Web Server - Weblogic
 
Posts: 85 | Registered: December 20, 2005Report This Post
Expert
posted Hide Post
yes, that's what i was saying above;
If you want to run a subfex passing the value MYVAR and having the drilldown on some fancier version of MYVAR, like MYVARNAME,
then something like this:
Just make sure the A200 is big enough because you'll be putting a class= attribute in there.
MYDRILL/A200='<a href="http://grwf01/cgi-bin/ibi_cgi/webapi.dll?'|
'IBIF_ex=fexname&|PARM1=' | MYVAR |'&|PARM2=WHATEVER&|PARM3=WHATEVER">' | MYVARNAME | '</A>';

and you could write
MYDRILL/A200= IF MYVAR IS 'FRED' THEN '<A ... this one is blue' ELSE
'<A and this anchor tag is green'...

Get the idea? This drill example is calling isapi (webapi.dll) not servlet, but if you like servlet, go ahead and call it instead.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Gold member
posted Hide Post
Susannah, I got your idea. My url looks like following. I have about dozen reports with 2 links per report. I wonder if it is worth.

http://maxfh1.verizon.com/ibi_apps/WFServlet?
IBIF_webapp=/ibi_apps&IBIC_server=EDASERVE&
IBIAPP_app=potsapp&&IBIMR_drill=X,fttpdoma/fttpdoma.htm&
IBIF_ex=app/gfrd.fex&CLICKED_ON=&
pFromDate=2005/10/01&pToDate=2005/12/27&
pRequestHost=%25&pTestHost=%25&
pBusinessName=%25&pServiceType=%25&
pTestType=%25&pWorkType=%25&pEvent=%25&
pDC=%25&pDim1=G_DELHOST&pDim2=G_DC&
pDim1Val=delphie1&pDim2Val=IN


I will try your 'HTMLFORM' idea though. Thx

This message has been edited. Last edited by: Govind Jujare,


WebFOCUS 5.3.3 MRE - Solaris - Sun Web Server - Weblogic
 
Posts: 85 | Registered: December 20, 2005Report This Post
Expert
posted Hide Post
ouch.
you're in mre
that makes it more work.
so i guess your format has got to be A1000 Smiler
just make sure you put an escape character, a pipe | after each & in your href.
good luck!




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
Govind, better idea...lets make this really simple. We can easily change the text color in a dd column using conditional styling. The only thing you'll lose is the CHANGE in color when your user hovers over it. But you can still make it underline on hover...
Compute some FLAG/I1 for whatever condition your need
TYPE=DATA,COLUMN=CAR,COLOR=RED,WHEN=FLAG EQ 0,
focexec=somefex(parms..),$
TYPE=DATA,COLUMN=CAR,COLOR=TEAL,WHEN=FLAG EQ 1,
focexec=somefex(parms..),$
..then in your HTMLFORM
HEAD>
<style>
A {color:#999999; text-decoration:NONE}
a:hover, a:active{ color:#6699cc; text-decoration:underline}
</style>

...the color will be overridden by the direct color reference in your focus style section, but the underline (or text-decoration feature) will still work. the color reference will only affect other dd's on your page, if you have any.
So simple.. see if this works for you.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Gold member
posted Hide Post
Susannah, I tried it. I see that it allows me to change color of links on mouseover (also making the underline appear on mouseover).

Isn't there a way to create white-links-on-blue-background and blue-links-on-white-background ? I tried to do it using 'WHEN' but no luck. I guess I will use a different coloring scheme.

Thx,


WebFOCUS 5.3.3 MRE - Solaris - Sun Web Server - Weblogic
 
Posts: 85 | Registered: December 20, 2005Report This Post
Virtuoso
posted Hide Post
Govind,

You can use custom CSS CLASSes to dynamically style report items as well. I will try to come up with an example that includes hyperlinks.

Here's an example:

TABLE FILE CAR
PRINT COUNTRY CAR
ON TABLE SET HTMLCSS ON
ON TABLE HOLD FORMAT HTMTABLE
ON TABLE SET STYLE *
TYPE=REPORT, STYLE=BOLD, COLOR=GREEN,$
TYPE=DATA, CLASS='ONE', WHEN=COUNTRY EQ 'ENGLAND',$
TYPE=DATA, CLASS='TWO', WHEN=COUNTRY EQ 'ITALY',$
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
< HTML >
< STYLE >
.ONE {background-color:#000080;color:#ffffff}
.TWO {background-color:#ffffff;color:#000080}
< / STYLE >
!IBI.FIL.HOLD;
< / HTML >
-HTMLFORM END


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
Govind,

Adjust the STYLE code to use the following:

< STYLE >
A {color:#999999; text-decoration:NONE}
TD.ONE a:hover, a:active{ color:#6699cc; text-decoration:underline}
TD.TWO A:hover {background-color:#ffffff;color:#800000}
< / STYLE >

The tricky part here is that when you use CLASS= in the FOCUS Stylesheet, it assigns the CLASS attribute to the TD, not the A. there fore you need to adjust the CSS to indicate that you want specific styling for all A that are contained within TDs that have a CLASS of ONE, for example. Hence the need to prefix the a:hover, a:active with the TD.ONE in the CSS.

I hope this makes sense. LEt me know if you have questions.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
I thought I would post the complete example just to make it easy.

TABLE FILE CAR
PRINT COUNTRY CAR
ON TABLE SET HTMLCSS ON
ON TABLE HOLD FORMAT HTMTABLE
ON TABLE SET STYLE *
TYPE=REPORT, STYLE=BOLD, COLOR=GREEN,$
TYPE=DATA, CLASS='ONE', FOCEXEC=CARFEX1, WHEN=COUNTRY EQ 'ENGLAND',$
TYPE=DATA, CLASS='TWO', FOCEXEC=CARFEX2, WHEN=COUNTRY EQ 'ITALY',$
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
< HTML >
< STYLE >
A {color:#999999; text-decoration:NONE}
TD.ONE a:hover, a:active{ color:#6699cc; text-decoration:underline}
TD.TWO A:hover {background-color:#ffffff;color:#800000}
< / STYLE >
!IBI.FIL.HOLD;
< / HTML >
-HTMLFORM END


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
ah. that's just the syntax we were looking for.
thanks mickey.

mickey, i tried it and can't make your example work?
SCRATCH! i got it working...
back to thanks, mickey

This message has been edited. Last edited by: susannah,




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
Susannah, the code works. Perhaps you forgot to remove the blanks in the html tags.

TABLE FILE CAR
PRINT COUNTRY CAR
ON TABLE SET HTMLCSS ON
ON TABLE HOLD FORMAT HTMTABLE
ON TABLE SET STYLE *
TYPE=REPORT, STYLE=BOLD, COLOR=GREEN,$
TYPE=DATA, CLASS='ONE', FOCEXEC=CARFEX1, WHEN=COUNTRY EQ 'ENGLAND',$
TYPE=DATA, CLASS='TWO', FOCEXEC=CARFEX2, WHEN=COUNTRY EQ 'ITALY',$
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<HTML>
<STYLE>
A {color:#999999; text-decoration:NONE}
TD.ONE a:hover, a:active{ color:#6699cc; text-decoration:underline}
TD.TWO A:hover {background-color:#ffffff;color:#800000}
</STYLE>
!IBI.FIL.HOLD;
</HTML>
-HTMLFORM END


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Francis,

How do you get the HTML tags to show up without adding blanks like I did in my posts?

Thanks!


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Gold member
posted Hide Post
I see that 'ENGLAND' links are now in gray color. Is there a way now to make the background of those lines to blue ? I tried it with webfocus's BACKCOLOR and also with CSS's background-color on 'A','TD.ONE'.

Thx


WebFOCUS 5.3.3 MRE - Solaris - Sun Web Server - Weblogic
 
Posts: 85 | Registered: December 20, 2005Report This Post
Virtuoso
posted Hide Post
You can do this a couple of ways.

1) Add the following new line to the WEBFOCUS Stylesheet.

TYPE=DATA, BACKCOLOR=NAVY, WHEN=COUNTRY EQ 'ENGLAND',$

2) or Add the following new line to the CSS.

TD.ONE {background-color:#000080}


I would choose #2 because it seems to behave better.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
Mickey, in the "Post A Reply" window, I clicked on "Options" on the left and selected "Disable HTML".

Cheers,

Francis.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Govind,

Try this new example. I think it might have all you need.

TABLE FILE CAR
PRINT CAR RCOST DCOST
BY COUNTRY SUBTOTAL AS '
ON TABLE SET HTMLCSS ON
ON TABLE HOLD FORMAT HTMTABLE
ON TABLE SET STYLE *
TYPE=REPORT, STYLE=BOLD, COLOR=GREEN,$
TYPE=DATA, CLASS='TWO', COLUMN=RCOST, FOCEXEC=CARFEX2,$
TYPE=DATA, CLASS='TWO', COLUMN=DCOST, FOCEXEC=CARFEX2,$
TYPE=SUBTOTAL, BACKCOLOR=NAVY, COLOR=WHITE,$
TYPE=SUBTOTAL, COLUMN=RCOST, CLASS='ONE', FOCEXEC=CARFEX1,$
TYPE=SUBTOTAL, COLUMN=DCOST, CLASS='ONE', FOCEXEC=CARFEX1,$
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<HTML>
<STYLE>
A:visited {color:#999999}
TD.ONE {background-color:#000080}
TD.ONE a:link {color:#ffffff; text-decoration:NONE}
TD.ONE a:hover {color:#ffff00; text-decoration:underline}
TD.ONE a:active{color:#6699cc; text-decoration:underline}
TD.TWO a:link {color:#000080; text-decoration:NONE}
TD.TWO a:hover {color:#800000; text-decoration:underline}
TD.TWO a:active{color:#6699cc; text-decoration:underline}
</STYLE>
!IBI.FIL.HOLD;
</HTML>
-HTMLFORM END


In reference to my previous post:

The reason why you need to control the background color in the CSS instead of in the WebFOCUS Stylesheet is because when WebFOCUS creates the HTML TABLE it can only put one CLASS=value in the TD code for any given cell. Doing a global 'TYPE=DATA, BACKCOLOR=NAVY' is overwritten for the cells for which we specifically apply a CLASS setting.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
Govind,

Make sure you clear the history of your browser to see the full effects of the new example I posted. It will show all links that have been visited as gray. If you clear the history you should see all the proper colors before clicking on a link.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Gold member
posted Hide Post
It seems to work. I will try to apply to my code and understand it a better with experiments. I will post the results soon. Thx.


WebFOCUS 5.3.3 MRE - Solaris - Sun Web Server - Weblogic
 
Posts: 85 | Registered: December 20, 2005Report This Post
Gold member
posted Hide Post
Mickey, Francis & Susannah, thank you all for the help. It worked great. I will start introducing CSS into my code. Till now I had been putting it off. The follg shows the style I settled on.

TABLE FILE CAR
PRINT CAR AS 'Car' RCOST AS 'Retail Cost' DCOST AS 'Dealer Cost'
BY COUNTRY AS 'Country'
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SUMMARIZE
ON TABLE HOLD FORMAT HTMTABLE
ON TABLE SET STYLE *
TYPE=REPORT,COLOR=BLACK,FONT='ARIAL',SIZE=9,$
TYPE=TITLE,CLASS='W_ON_B',FOCEXEC=CARFEX1,$
TYPE=GRANDTOTAL,CLASS='W_ON_B',FOCEXEC=CARFEX1,$
TYPE=DATA,CLASS='B_ON_W',FOCEXEC=CARFEX1,$
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<HTML>
<STYLE>
TABLE { border-collapse:collapse; border-left: 1.00pt SOLID #000000; 
border-right: 1.00pt SOLID #000000;}
TD    { border-top: 1.00pt SOLID #000000; border-bottom: 1.00pt SOLID #000000; 
border-right: 1.00pt SOLID #000000; }
A:visited {color:#999999}
TD { vertical-align:top; padding-left:6pt; padding-right:6pt; }
TD.W_ON_B {background-color:#0000ff}
TD.W_ON_B a:link   {color:#ffffff; text-decoration:NONE}
TD.W_ON_B a:hover  {color:#ffff00; text-decoration:underline}
TD.W_ON_B a:active {color:#6699cc; text-decoration:underline}
TD.B_ON_W a:link   {color:#000080; text-decoration:NONE}
TD.B_ON_W a:hover  {color:#cc0033; text-decoration:underline}
TD.B_ON_W a:active {color:#6699cc; text-decoration:underline}
</STYLE>
!IBI.FIL.HOLD;
</HTML>
-HTMLFORM END

This message has been edited. Last edited by: Kerry,


WebFOCUS 5.3.3 MRE - Solaris - Sun Web Server - Weblogic
 
Posts: 85 | Registered: December 20, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Change color of hyper links selectively for one row ?

Copyright © 1996-2020 Information Builders