From b77e5440f9a866b464b0077478b604df513cf3fc Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 21 Jul 2010 15:06:07 +0000 Subject: [PATCH] URLs that begin with javascript: are opened in the same window. See http://issues.jalview.org/browse/JAL-604 --- src/jalview/appletgui/AlignFrame.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index ccf7c06..14606b7 100755 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -2580,8 +2580,14 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, { System.out.println("Show url: " + url); } - viewport.applet.getAppletContext().showDocument( + if (url.indexOf("javascript:")==0) + { + // no target for the javascript context + viewport.applet.getAppletContext().showDocument(new java.net.URL(url)); + } else{ + viewport.applet.getAppletContext().showDocument( new java.net.URL(url), target); + } } catch (Exception ex) { ex.printStackTrace(); -- 1.7.10.2