Send a serverside redirect to a new window


<xp:link escape="true" text="Start" id="link2">
  <xp:eventHandler event="onclick" submit="true"
    refreshMode="partial" refreshId="link2">
    <xp:this.action><![CDATA[#{javascript:
      //execute server side code here to determine a target url
      var target = "http://www.nu.nl";
      view.postScript("window.open('" + target + "')");}]]>
    </xp:this.action>
  </xp:eventHandler>
</xp:link>
All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.
No comments yetLogin first to comment...