Katie Hausmann Posted September 3, 2019 Share Posted September 3, 2019 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 More sharing options...
Shandilya Peddi Posted September 9, 2019 Share Posted September 9, 2019 I just tried the script and it works for me on my end as it launches a new window with the URL. Is this issue for you in WebPlayer or Analyst What errors do you see Does it launch a new tab or fails what are the symptoms Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now