本文介绍了JavaScript未通过Ajax执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Ajax对象执行一页...但是在该页面中,特定脚本无法正常工作,甚至在该脚本标记中也没有进行控制,并且我无法正确获得结果.当我在 标记中放入相同的URL并单击指向该链接时,它将正确执行.
I''m using Ajax object to execute one page... but within that page particular script is not working and even control is not going in that script tag and I''m not getting result correctly. When I put the same URL in tag and click to that link it''s executing correctly.
function(){ url = "../inside/catalog_open_settings_images.asp?mode=PP&frombar=1&fromLink=1&CategoryID="+ CategoryID + "&SubCategoryID=" + SubCategoryID + "&refSubCategoryID=" + refSubCategoryID +"g_span="+ g_span ; http_getImage.open("GET", url, true); http_getImage.onreadystatechange = handler_getImage_modalPOPUP; } function handler_getImage_modalPOPUP() { if (http_getImage.readyState == 4) { var result = http_getImage.responseText; } }推荐答案
您没有给第一个函数命名,这使完整的脚本块无效.给您的函数起个名字,它将起作用 you have not given name to the first function, this is making complete script block invalid. Give your function a name and it will work
更多推荐
JavaScript未通过Ajax执行
发布评论