tags:

views:

635

answers:

1

Hi,

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.

A: 

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.

rossdavidh
Oh, I was testing this in Cognos 8.4 on IE/Vista, by the way.
rossdavidh