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     HTML Layout Page Javascript Works in IE but not in Firefox

Read-Only Read-Only Topic
Go
Search
Notify
Tools
HTML Layout Page Javascript Works in IE but not in Firefox
 Login/Join
 
Guru
posted
Hi,

I've created a report launch page in HTML Layout Painter that includes some javascript that works in IE but not in Firefox. Here is the scenario...
The page has a series of radio buttons for the user to select which report they want to run. I created the radio button array (which is really a set of checkboxes in the html code created by the HTML Layout Painter) and they have IDs of viewselect_0, viewselect_1, ... viewselect_6.

I edited the hyperlink properties of the Submit button to include a request for each of the reports available. The requests have IDs from 1 through 7

Here is the section of code in question...

//Begin function SubmitBtn_OnClick
function SubmitBtn_OnClick(ctrl) {
// TODO: Add your event handler code here
if (viewselect_0.checked) {SubmitBtn.requests_list = "1"} else
if (viewselect_1.checked) {SubmitBtn.requests_list = "2"} else
if (viewselect_2.checked) {SubmitBtn.requests_list = "3"} else
if (viewselect_3.checked) {SubmitBtn.requests_list = "4"} else
if (viewselect_4.checked) {SubmitBtn.requests_list = "5"} else
if (viewselect_5.checked) {SubmitBtn.requests_list = "6"} else
if (viewselect_6.checked) {SubmitBtn.requests_list = "7"} else
{SubmitBtn.requests_list = "0"}
OnExecute(ctrl)
}
//End function SubmitBtn_OnClick


This works OK in IE but in Firefox all the requests are executed. How can I reform this code so it works in Firefox as well as IE?

Thanks!

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Virtuoso
posted Hide Post
The correct syntax in js to see if a radio button is checked would be
if (document.getElementById("viewselect_0").checked == 'true') {
.
.
}


IE is more lenient in the syntax it will run, Firefox is more correct.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Guru
posted Hide Post
Alan,

Thanks for the tip. After playing around with it this is what I ended up with that would work in both browsers...
//Begin function SubmitBtn_OnClick
function SubmitBtn_OnClick(ctrl) {
// TODO: Add your event handler code here
if (document.getElementById("viewselect_0").checked == true) {SubmitBtn.setAttribute("requests_list","1")} else
if (document.getElementById("viewselect_1").checked == true) {SubmitBtn.setAttribute("requests_list","2")} else
if (document.getElementById("viewselect_2").checked == true) {SubmitBtn.setAttribute("requests_list","3")} else
if (document.getElementById("viewselect_3").checked == true) {SubmitBtn.setAttribute("requests_list","4")} else
if (document.getElementById("viewselect_4").checked == true) {SubmitBtn.setAttribute("requests_list","5")} else
if (document.getElementById("viewselect_5").checked == true) {SubmitBtn.setAttribute("requests_list","6")} else
if (document.getElementById("viewselect_6").checked == true) {SubmitBtn.setAttribute("requests_list","7")} else
{SubmitBtn.setAttribute("requests_list","0")}
OnExecute(ctrl)
}
//End function SubmitBtn_OnClick


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report 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     HTML Layout Page Javascript Works in IE but not in Firefox

Copyright © 1996-2020 Information Builders