Embed webplayer into Webpage Not Working when using Spotfire Server.

I am using GetJavaScriptApi.ashx?Version=6.0 and I am getting an undefined return when I attempt to use the following to open an analysis. Kindly help.

window.onload = function(){
            
            app = new spotfire.webPlayer.Application("https://[webplayer server]/SpotfireWeb", customization);
            doc = new spotfire.webPlayer.Document(app, c_analysisPath);
            
            console.log(app);
            //hide ui elements
            
            var c_analysisPath="/path/analysis_name";

            //spotfire.webPlayer.Application.prototype.open = function(analysisPath,divId,parameters,documentId)

            var viewOne = app.open(c_analysisPath,"webpanel","");
            console.log(viewOne); //returns undefined
        }

 

(1) Answer

Login