Jump to content

Javascript no longer working in Spotfire 10.3


Katie Hausmann

Recommended Posts

This Javascript worked in 7.12 and lower versions of Spotfire but now we're getting an error message that is preventing some underlying scripts from running:

 

function actionGo()

{

var userIDLabelValue = $("#username").text();

var studyIDLabelValue = $("#pStudyID").text();

var urlIDLabelValue = $("#urlLink").text();

var configFlagLabelValue = $("#useConfigFlag").text();

var pageNameLabelValue = $("#lblPageName").text();

if (pageNameLabelValue === "None") {

pageNameLabelValue = "None";

}

 

var httpAddress = urlIDLabelValue;

var configBlock = "&configurationBlock=";

var rlsRunFlagProperty = "RLSRunFlag=%22Yes%22;";

var mngStudyRunFlag = "RunManageStudyFlag=%22Yes%22;";

// surround parameters with double quote HTML characters

var userIDProperty = "parmUserId=%22" + userIDLabelValue + "%22;";

var studyIDProperty = "parmStudyId=%22" + studyIDLabelValue + "%22;";

var pageNameProperty = "parmGoToPg=%22" + pageNameLabelValue + "%22;";

// a dashboard MUST be selected AND a Study Row Id MUST be set

if (urlIDLabelValue != "(Empty)") {

if (studyIDLabelValue === "None") {

// simply launch the dashboard (no config block) specified by the toggle

var urlAddress = httpAddress;

} else {

if (pageNameLabelValue === "None"){

// pass config block, manage a study and land on first page after manage study

var urlAddress = httpAddress + configBlock + rlsRunFlagProperty + mngStudyRunFlag + userIDProperty + studyIDProperty;

} else {

// pass config block, manage a study and land on the page specified by the toggle

var urlAddress = httpAddress + configBlock + rlsRunFlagProperty + mngStudyRunFlag + userIDProperty + studyIDProperty + pageNameProperty;

}

}

// launch the dashboard specified by the toggle in a new browser window

window.open(urlAddress, '', 'fullscreen=no, scrollbars=yes,location=yes,resizable=yes');

} else {

alert("You must first select a dashboard from the right toggle!")

}

}

$("#detailsButton").click(actionGo);

 

Error Messages from the developer tool:package=js:41 [Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...