JavaScript未通过Ajax执行

编程入门 行业动态 更新时间:2024-10-21 03:51:57
本文介绍了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执行

本文发布于:2023-10-11 22:53:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1483067.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:JavaScript   Ajax

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!