cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
tsolomon
Level III

Interactive HTML hyperlink doesnt work

I have a script which combines to vlistboxes with button boxes that have hyperlinks in a data table. I save the data table into a report which is an interactive html file. When I save as interactive html, the hyperlinks are disabled. Is there a way to enable them? When I save the data table as regular html, the hyperlinks work but the vlistboxes have different cell sizes and the report looks awful. Is there a way to fix the cell sizes of vlistboxes? I tried putting the vlistboxes in lineup boxes with a fixed size. It looks fine in the journal but once I save to html the formatting is lost.

 

The code is atttached, any help is greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Interactive HTML hyperlink doesnt work

After talking with @Melanie_J_Drake about JSL, I realised my suggestion wasn't so easy to implement.

With her advice and help from this discussion How-to-generate-buttons-within-a-loop, I figured I should help you out a bit more.

 

Try the following for your first For loop:

For( i = 1, i < 10, i++, ( 
	event = Char( :event_number[i]);
	url = (EvalInsert( "http://test.new.com/^event^"));
	button_expr = evalinsert("\[one_button = button box("^event^", web("^url^"), <<underlinestyle)]\");
       eval(parse(button_expr));
  	v << append(one_button);
  )
);

 

 

 

 

View solution in original post

5 REPLIES 5

Re: Interactive HTML hyperlink doesnt work

Interactive HTML can only enable hyperlink buttons with a simple web expression in their script. Your example produces button scripts that look like:

Web("http://test.new.com/" || Char(:event_number[i]));

 

If your script could produce buttons with simple web links in their button script like:

Web("http://test.new.com/");

 

They should work when saved as Interactive HTML.

 

 

Re: Interactive HTML hyperlink doesnt work

After talking with @Melanie_J_Drake about JSL, I realised my suggestion wasn't so easy to implement.

With her advice and help from this discussion How-to-generate-buttons-within-a-loop, I figured I should help you out a bit more.

 

Try the following for your first For loop:

For( i = 1, i < 10, i++, ( 
	event = Char( :event_number[i]);
	url = (EvalInsert( "http://test.new.com/^event^"));
	button_expr = evalinsert("\[one_button = button box("^event^", web("^url^"), <<underlinestyle)]\");
       eval(parse(button_expr));
  	v << append(one_button);
  )
);

 

 

 

 

tsolomon
Level III

Re: Interactive HTML hyperlink doesnt work

This works great. I now have active hyperlinks in my intteractive html file. Thanks for the prompt support!!

 

Cheers,

Tesfu

SKR
SKR
Level I

Re: Interactive HTML hyperlink doesnt work

 

I want to open an image, instead of a web page and modified the code from above like this:

For
( i = 1, i < 10, i++, ( event = Char( :event_number[i]); url = (EvalInsert( "http://test.new.com/^event^")); button_expr = evalinsert("\[one_button = button box("^event^", New Window( "Name_xxx", open( img_path, "png")))]\"); eval(parse(button_expr)); v << append(one_button); ) );

This works fine in the jmp report. However, when I create manually an interactive html the links do not work anymore, but give the message: "Disabled script button", when I try to hit the button!
Any suggestions?

 

Re: Interactive HTML hyperlink doesnt work

Hi @SKR , 

For this to work, the expression needs to be a simple web expression, like:

Web("http://test.new.com/");

 

Open(image_path, png);

will not work, because Open does not have support in Interactive HTML like the Web command.

 

If you could modify your code to combine the image file name in the URL and use the Web command instead of Open, the Web command should look something like:

Web("http://test.new.com/image1.png");

This is a simple web expression, which should work when saved as interactive HTML.

 

Hope that helps, 

~John