If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Help needed regarding following Script !

Started by sri44, 15 Apr 2010 01:58:54 PM

Previous topic - Next topic

sri44

Hi all,
I need help in figuring out this Script.

I have placed html Item  in the List  and kept following Java script by DataItem Value. I did not know why the issue number in the script is taking Last value in the List instead of actuall value.
If i run for  only one Issue number it is running fine that .but if i run for multiple issue numbers in the list , Its taking Last value of Issue numbers

My Issue Number is coming from URL Dataitem In the Query
its definition is  like this
'http://placogtst02/cognos8/buildinvissuelupdate.php?issuenumber=' +  [Issue Number Char] + '&status=' + [New Status] + '&updateuser=' + [User Name] + '&updateemail=' + [User Email]

When i generate Tabular data its showing correct Issues numbers in that but where as if run report its not working fine ..


Here is the Script..





'<button type="button"  onclick="exe_query()" >Change Status</button>'

+

'

<script>



function exe_query()
{

  var url = "";                                       

  url = " '+ //+%20'"%20;%20alert(url); %20req%20=%20initRequest(url);%20 %20[url="//req.open"]req.open("GET", url, true);
  req.onreadystatechange = onPostSubmit_init;
  req.send(null);

msg="Status has been updated"

  alert(msg);

 

   rerunreport();
                                                                                     
}

function initRequest()
{

           if (window.XMLHttpRequest)
                  { return new XMLHttpRequest(); }
           else if (window.ActiveXObject)
   { isIE = true;
                      return new ActiveXObject("Microsoft.XMLHTTP");
                      }
}

function onPostSubmit_init()
{

     if (req.readyState==4 || req.readyState=="complete")
        {
        if (req.status != 200)
           { return; }
          }
}
   
</script>'