Ajax is undefined
This is my code. When I run this I get an error: "Ajax is undefined". The error line is highlighted by black letters.
function funGetName()
开发者_高级运维{
var id=document.getElementById("Cust_Id").value;
var URL="Default.aspx?TODO=getName&custId="+id;
alert(id);
var ajax=new Ajax.Request(URL,
{
method:'get'
});
}
Try putting the opening brace on the same line, after URL,
. It may be a semicolon insertion problem.
i.e.:
var ajax=new Ajax.Request(URL, {
method:'get'
});
精彩评论