cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
noviJSL
Level II

Saving a table box window with HTML links as HTML Report

Hello,

In JMP12, I have a scripted table box with hyperlinks that I want to save as an HTML report (or any other type of report that will keep the hyperlinks active). I get an error from JMP while saving the report with no error description in the log except "unknown".

 

Is there anything I am missing?

 

See the sample script below:

 

 

path = Get Default Directory();
alist = {"a", "b", "c"};
nlist = {1, 2, 3};

disp_name = {"JMP Home Page", "JMP Home Page", "JMP Home Page"};

link = "https://www.jmp.com/en_us/home.html";

nw = New Window( "Buttons in Tablebox",
	tb = Table Box( String Col Box( "ABC", alist ), Number Col Box( "123", nlist ), bb = Col Box( "Links" ) )
);

bblist = {};
For( i = 1, i <= N Items( alist ), i++,
	bb_expr = Eval Insert(
		"\[bblist[i] = buttonbox(disp_name[Eval(i)], Web(WO_links[Eval(i)]), <<underlinestyle)]\"
	);
	Eval( Parse( bb_expr ) );
	bb << append( bblist[i] );
);

nw << Save HTML( path || "test.htm" );

 

 

 

3 REPLIES 3

Re: Saving a table box window with HTML links as HTML Report

Hi @noviJSL,

 

Our HTML and Interactive HTML export capabilities are only a subset compared to JMP, but we're expanding the capability with every release.

You may have heard that anything not yet supported in Interactive HTML will be mentioned in the log. When you use 'Save HTML', you do not get these warnings in the log, but you should when you use 'Save Interactive HTML'

 

TableBox is not currently supported in Interactive HTML, so you would need to build your "table" with something that is supported. Like 'H List Box' and 'V List Box'. Also, the expression that is within the 'Web' command cannot be evaluated within the web page as we do not have a JSL language interpreter in our web (JavaScript) code. 

 

With some small changes, the expression in the Web command can be evaluated as your 'table' is created. 

Here's an example that does this. The resulting 'table' isn't as tidy looking as a real table, but maybe you can find ways to add spacing to align things better. 

path = Get Default Directory();
alist = {"a", "b", "c"};
nlist = {1, 2, 3};

disp_name = {"JMP Home Page", "JMP Home Page", "JMP Home Page"};

link = "https://www.jmp.com/en_us/home.html";

nw = New Window( "Buttons in NW", v = V List Box());
// header row
h = H List Box ();
h << append(TextBox( "ABC" ));
h << append(TextBox( "123" ));
h << append(TextBox( "Links" ));
v << append( h );

For ( i = 1, i <= N Items( alist ), i++, (
	r = H List Box();
	r << append(TextBox( alist[ i ]));
	r << append(TextBox( nlist[ i ]));
	bb_expr = Eval Insert(
		"\[bb = buttonbox(disp_name[Eval(i)], Web("^link^"), <<underlinestyle)]\"
	);
	Eval( Parse( bb_expr ) );
	r << append( bb );
	v << append( r );
));

nw << Save Interactive HTML("$DESKTOP/test.htm" );
open("$DESKTOP/test.htm" );

One disclaimer: I ran this in JMP 13, the oldest version of JMP I had installed. It may need some adjustment to work in JMP 12.

I hope this gets you closer to what you need. 

~John    

noviJSL
Level II

Re: Saving a table box window with HTML links as HTML Report

Thanks! This works for what I am looking for. 

Re: Saving a table box window with HTML links as HTML Report

You're welcome.