I call an external .vm file from my plugin. The .vm file contains Java Script which opens a new browser and sets the focus to the new browser page.
My Atlassian-plugin.xml, which is the file you build the plugin with and which contains the <link> tags, looks like this:
{code}
<web-item key="rally_link" name="Rally Hosted Web Site" section="links_link/links_section" weight="10">
<label>Rally - Hosted Scrum Tool</label>
<link >/templates/rally.vm</link>
</web-item>
{code}
My .vm files contents look like this:
{code}
<!-- Open a new browser window from a plugin -->
<html>
<head>
<script type="text/javascript">
function load()
{
newwindow = window.open("https://rally1.rallydev.com/slm/login.op", "newwindow")
<!-- have JIRA window go back a page -->
history.go( -1 );
<!-- Set focus to the new page -->
newwindow.focus();
<!-- Move the new page to the forground -->
newwindow.resizeTo(875, 320);
newwindow.moveTo(0,0);
return false;
}
</script>
</head>
<body
onload="load()">
</body>
</html>
{code}
*.vm files are located here on the server:
/webapps/ROOT/WEB-INF/classes/templates
Hope this helps