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 = " '+ [URL]+ '" ;
alert(url);
req = initRequest(url);
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>'