在 Cognos 8.4 中使用表单 HTML 表单
我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,所以我意识到这个答案可能为时已晚,无法帮助您,但既然我遇到了这个问题,也许其他人也会这么做。如果您想要的是为人们提供一些可以单击以查看此弹出窗口的东西,那么您可以将所有这些都放在 Cognos 中的 HTML 元素中:
您将其称为按钮输入的事实使其变得混乱在 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:
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.