Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Open multiple hyperlinks
BRM
<p>Is there a way to open multiple hyperlinks by clicking on a single cell in a BIRT report?</p><p> </p><p>Right now I have 3 columns in a report that each open a hyperlink. But there is a one-to-one relationship between the rows and the external pages so I am wondering if I can save the user the trouble and just open them all at once. They would all open in the same place, so multiple targets is not an issue.</p>
Find more posts tagged with
Comments
kclark
<p>Do you need all thee columns to be links or could you have a fourth with one link for all 3? You could create a fourth column in your table to hold the link. Then in the onCreate() of the other three store the values in a PGV. In the fourth column use a text item and change the text from the onCreate() to hold an "Open Pages" link. You could then write a function using some JavaScript for the text item to open all three links in a new window using window.open(). </p>
BRM
<p>The forth one with all the links is what I was after.</p><p> </p><p>So I have the PGV's set. I am having a little trouble with how to call window.open() from script within that text item. Is that a standard JaveScript item?</p><p> </p><p>I've done some scripting but am still a bit new to it.</p>
kclark
<p>It would look something like this:</p><pre class="_prettyXprint">this.text = "<html>" + "<head>" + "<script>" + "function openLinks() {" + " window.open("http://www.google.com");" + " window.open("http://www.yahoo.com");" + " window.open("http://www.bing.com");" + "}" + "</script>" + "<body>" + "<a href=" " onClick="openLinks();">Click Me!</a>" + "</body>" + "</html>";</pre><p>You'll need to store the PGV's in a variable above all that code then you can plug them into where I have the three URLs.</p>
BRM
<p>I'm sure I am not understanding you correctly but here is what I did.</p><p> </p><p>In the onCreate() script of a text item I put the following script, (I can get the correct URL's into the variables)</p><p> </p><div>l1 = "www.google.com";</div><div>l2 = "www.yahoo.com";</div><div>l3 = "www.bing.com";</div><div> </div><div>this.text = "<html>" +</div><div> "<head>" +</div><div> "<script>" +</div><div> "function openLinks() {" +</div><div> " window.open(" + l1 + ");" +</div><div> " window.open(" + l2 + ");" +</div><div> " window.open(" + l3 + ");" +</div><div> "}" +</div><div> "</script>" +</div><div> "<body>" +</div><div> "<a href=" " onClick="openLinks();">Click Me!</a>" +</div><div> "</body>" +</div><div> "</html>";</div><div> </div><div>What I get is the html text in the text item. So I must be doing something wrong or misunderstanding.</div><div> </div><div>Also, one of the links is to another BIRT report. The other two are external links. Will this framework handle this as well?</div><div> </div><div>(it would sure be nice to have an easier way to add pictures)</div>