在 Cognos 8.4 中使用表单 HTML 表单

发布于 2024-08-04 08:15:48 字数 727 浏览 2 评论 0原文

我在 Cognos 8.4 报告中使用 HTML 表单,其代码如下所示:-

<form name="floodzone"><p>
    <input type="text" size="60" name="address" value="1600 Amphitheatre Pky, Mountain View, CA" />
    <input type="button" value="Go!" onclick="showAddress();" />
  </p>

<div id="map_canvas" style="width: 1000px; height: 375px"></div></form>**

我在 HTML 项目本身中以以下方式引用上述代码:-

function showAddress() {

//var address = 
alert(document.floodzone.address.value);}

但是当我单击 Go 按钮时,我收到以下错误作为“页面错误”(您在浏览器上看到的错误):- 错误:“document.floodzone.address”为空或不是对象,

当我使用 Frontpage 或普通 IE 运行时,相同的代码本身运行良好。但是当我将其放入 Cognos HTML 容器中时,就会出现错误。

请求任何线索。

Iam using a HTML form in my Cognos 8.4 report the code for which is seen below:-

<form name="floodzone"><p>
    <input type="text" size="60" name="address" value="1600 Amphitheatre Pky, Mountain View, CA" />
    <input type="button" value="Go!" onclick="showAddress();" />
  </p>

<div id="map_canvas" style="width: 1000px; height: 375px"></div></form>**

and i am referencing the above code in the follwoing manner in the HTML item itself:-

function showAddress() {

//var address = 
alert(document.floodzone.address.value);}

But when i click on the Go button i get the following error as an 'Error in page' (the one u get on the browsers):-
Error: 'document.floodzone.address' is null or not an object

this same code when i run using Frontpage or Normal IE itself runs fine. But as soon as i put this in Cognos HTML container it thros the error.

Request any leads into this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

羅雙樹 2024-08-11 08:15:48

好吧,所以我意识到这个答案可能为时已晚,无法帮助您,但既然我遇到了这个问题,也许其他人也会这么做。如果您想要的是为人们提供一些可以单击以查看此弹出窗口的东西,那么您可以将所有这些都放在 Cognos 中的 HTML 元素中:

<script>
function showAddress() {
alert("1600 Amphitheatre Pky, Mountain View, CA");}
</script>
<p onclick="showAddress();">click here to see address  </p>

您将其称为按钮输入的事实使其变得混乱在 Cognos 自己的 javascript 中(顺便说一句,也弄乱了它的一些按钮,或者至少对我来说是这样)。当然,您可能想要放置一个图像标签,而不是段落标签,如果这是您的用户所期望的,则带有看起来像按钮的东西。

Ok, so I realize this answer is probably way too late to help you, but since I came across this question, perhaps someone else will as well. If what you're wanting is to give the person something they can click on to see this popup, then you can just put this all in an HTML element in Cognos:

<script>
function showAddress() {
alert("1600 Amphitheatre Pky, Mountain View, CA");}
</script>
<p onclick="showAddress();">click here to see address  </p>

The fact that you were calling it a button input was getting it tangled up in Cognos' own javascript (and also messing up some of its buttons, by the way, or at least it did for me). Of course, instead of a paragraph tag you'd probably want to put an image tag, with something that looks like a button if that's what your users expect.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文