I must be doing something wrong

still doesnt work, are you using atlas for you development.
here is the link to the test sample
http://www.intellihome.com.au/apsx/test.htm
works in browser , not in mce
Could you take a look at code as see where im going wrong
getcubs.js
var xmlHttp
function GetCBus(str)
{
if (str.length==0)
{
document.getElementById(str).innerHTML="99"
return
}
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
}
var url="state.asp"
url=url+"?q="+str+Math.random()
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
a=(xmlHttp.responseText).substring(0,8)
b=(xmlHttp.responseText).substring(8,30)
document.getElementById(a).innerHTML=b
}
}
function GetXmlHttpObject()
{
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
}
state.asp
<%
response.write(ucase(request.querystring("q")))
%>