【问题标题】:Adding Javascript/HTML Form functionality to an 'html item' in COGNOS Report Studio v10在 COGNOS Report Studio v10 中将 Javascript/HTML 表单功能添加到“html 项目”
【发布时间】:2013-06-06 18:51:10
【问题描述】:

下面是我想使用 html 项插入到我的 COGNOS 报告中的代码;

<html>
<head>
<script>

function openWindow()
{
windowObject = window.open('http://www.google.com/','_blank','width=400,height=700,status=yes,resizable=yes,scrollbars=yes');
windowObject.focus();//gives focus to window
}

</script>
</head>
<body>

<FORM METHOD="LINK" ONSUBMIT="openWindow()">
<INPUT TYPE="submit" VALUE="Info">
</FORM>

</body>
</html>

如果我将其复制并粘贴到 COGNOS Report Studio 中的一个 html 项目中,就会发生奇怪的事情并且它不起作用。有什么想法可以让它正常工作吗?提前感谢您的帮助!

【问题讨论】:

    标签: javascript html cognos


    【解决方案1】:

    在 COGNOS Report Studio 中,我能够将单个“html 项”拖到我的报告中,并将以下代码放入其中;

    <script>
    
    function openWindow()
    {
    windowObject = window.open('http://www.google.com/','_blank','width=400,height=700,status=yes,resizable=yes,scrollbars=yes');
    windowObject.focus();//gives focus to window
    }
    
    </script>
    
    <input type="button" value="Info" onclick="openWindow();" />
    

    现在我的图表右上角有一个按钮,点击后会打开一个单独的窗口(具有设定的大小),以显示与图表有关的其他信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-28
      • 1970-01-01
      • 1970-01-01
      • 2020-10-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多