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     [SOLVED] Button Color IE or Chrome

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Button Color IE or Chrome
 Login/Join
 
Guru
posted
I presently have javascript executing a certain set of commands based on the color of the button. I am tryning to get this code to work for both IE and Chrome.

For IE I am using the following commands.

var b1 = IbComposer_getComponentById('button1');

if (b1 !== null && b2.style.color == "#9fff41") {
b1.onclick("left");
}

For Chrome I am using the following commands.

var b1 = IbComposer_getComponentById('button1');

if (b1 !== null && b1.style.color == 'rgb(159, 255, 65)' ) {
b1.onclick("left");
}

It appears that if I want to accommodate both at the same time, I would have to use the following.

var b1 = IbComposer_getComponentById('button1');

if (b1 !== null && (b1.style.color == 'rgb(159, 255, 65)' || b2.style.color == "#9fff41")) {
b1.onclick("left");
}

Is there a way to have both IE and Chrome pass the same value, so that I do not have to look for both?

This message has been edited. Last edited by: Jay Potter,


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
 
Posts: 341 | Location: Pembroke NH/Jericho NY | Registered: June 15, 2011Report This Post
Expert
posted Hide Post
Jay, this is a browser idiosyncrasy.

Try this: using the text editor, add a valid HTML5 doctype to the top of the code, this seems to resolve the browser issue in IE 9.

<!DOCTYPE html>


Save the page.

The page can be opened in the HTML Composer GUI, but you will have to remember that after saving from the GUI, edit the page in the text editor and remove the first line which is a comment line that is added by the GUI, rendering the page non standard. This will have to be done every time you use the GUI to edit the page.


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
Guru
posted Hide Post
Thank You for the suggestion.

It does work, but I do not like playing the game of having to take something out evry time I add change to the form. Plus if I have a problem with the form, support will not help when making it non standard.


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
 
Posts: 341 | Location: Pembroke NH/Jericho NY | Registered: June 15, 2011Report This Post
Expert
posted Hide Post
Jay,

Checking on colours is always a dubious test - although I have encountered it in some Customer code.

I would rather see a test on a class inclusion than for a specific colour - primarily for the problem that you are relating. It's safer and means that you shouldn't need to keep changing code outside of the GUI.

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Guru
posted Hide Post
I will look into that concept,

Thank you for that suggestion.


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
 
Posts: 341 | Location: Pembroke NH/Jericho NY | Registered: June 15, 2011Report This Post
Expert
posted Hide Post
I'll stop changing the code outside the GUI once IBI truly creates HTML 5 compliant code. As far as I know, WebFOCUS 8.0.0.7 Composer does not do this yet.


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
Guru
posted Hide Post
Unfortunately you are correct!!!!


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
 
Posts: 341 | Location: Pembroke NH/Jericho NY | Registered: June 15, 2011Report 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     [SOLVED] Button Color IE or Chrome

Copyright © 1996-2020 Information Builders