URLs that begin with javascript: are opened in the same window. See
authorjprocter <Jim Procter>
Wed, 21 Jul 2010 15:06:07 +0000 (15:06 +0000)
committerjprocter <Jim Procter>
Wed, 21 Jul 2010 15:06:07 +0000 (15:06 +0000)
http://issues.jalview.org/browse/JAL-604

src/jalview/appletgui/AlignFrame.java

index ccf7c06..14606b7 100755 (executable)
@@ -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();