Change color of hyper links selectively for one row ?
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
December 27, 2005, 03:25 PM
susannah
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
December 28, 2005, 02:18 PM
Govind Jujare
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
December 28, 2005, 05:29 PM
susannah
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.
I will try your 'HTMLFORM' idea though. ThxThis message has been edited. Last edited by: Govind Jujare,
WebFOCUS 5.3.3 MRE - Solaris - Sun Web Server - Weblogic
December 28, 2005, 06:41 PM
susannah
ouch. you're in mre that makes it more work. so i guess your format has got to be A1000 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
December 30, 2005, 04:44 PM
susannah
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
December 30, 2005, 11:40 PM
Govind Jujare
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
January 03, 2006, 09:31 AM
mgrackin
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
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
January 03, 2006, 10:31 AM
mgrackin
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
January 03, 2006, 10:37 AM
susannah
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, mickeyThis message has been edited. Last edited by: susannah,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
January 03, 2006, 01:57 PM
Francis Mariani
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
January 03, 2006, 02:22 PM
mgrackin
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
January 03, 2006, 02:57 PM
Govind Jujare
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
January 03, 2006, 03:27 PM
mgrackin
You can do this a couple of ways.
1) Add the following new line to the WEBFOCUS Stylesheet.
I would choose #2 because it seems to behave better.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
January 03, 2006, 03:33 PM
Francis Mariani
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
January 03, 2006, 04:14 PM
mgrackin
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
January 03, 2006, 04:16 PM
mgrackin
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
January 03, 2006, 05:08 PM
Govind Jujare
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
January 04, 2006, 01:25 AM
Govind Jujare
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