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 url in javascript of text element?
Arif shah
<p>Hi,</p>
<p> </p>
<p>I want to open a report through a text item using some javascript. I have the following two question</p>
<p> </p>
<p>1) How do we access a parameter value in text item javascript code?</p>
<p> </p>
<p>2) How do we open a url using the javascript code.</p>
<p> </p>
<p>I have written the following code but it does not seem to work</p>
<pre class="_prettyXprint">
<script>
function opentab()
{
if (<VALUE-OF>params["Category"]</VALUE-OF> == 'Part1')
{
window.open("https://localhost:8443/Datavis/frameset?__report=Crime%20Main.rptdesign&sample=my+parameter","_self")
}
}
</script>
<button type="button"
style="width: 150px; height: 30px; color: #5a698b; font: bold 12px Arial;
padding-top: 1px; padding-bottom: 1px; background: #ddddff; text-align: center;"
onclick=" opentab()";">Overview
</button></pre>
<p>If someone can also suggest a better solution, that will be even better</p>
<p> </p>
<p>Thanks</p>
<p>Arif</p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
kclark
<p>At first glace everything looks ok to me, if you use alert() to view the contents of your parameter are you seeing the correct value?</p>