0
称为链接我想一个网页,我有三个环节,每个都有其调用Ajax页面和响应文本在必要的div显示onclick事件上使用的颜色框。一切工作正常,除了彩盒链接。在我通过ajax调用内容后,链接无法显示colorbox。这里是我的代码来调用页面加载工作时的颜色框。彩盒没有出现通过Ajax
<p>
$(document).ready(
function()
{
$(".editchecklist").colorbox({width:"50%", height:"35%", iframe:true, onClosed:function(){ location.reload(true); } });
}
);
我试图寻找这个问题,但一切都与jQuery ajax调用不是简单的ajax调用有关。建议使用.live()或rebind方法,我不知道如何以及在哪里使用它们。 这里是我的Ajax调用代码:
function getxmlhttp()
{
var xmlHttp = false;
if (window.XMLHttpRequest)
{
// If IE7, Mozilla, Safari, etc: Use native object
var xmlHttp = new XMLHttpRequest();
}else
{
if (window.ActiveXObject)
{
// ...otherwise, use the ActiveX control for IE5.x and IE6
var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}
function process_ajax2(phpPage, objID, getOrPost,clickedLink)
{
xmlhttp = getxmlhttp();
var obj = document.getElementById(objID);
if(getOrPost == "get")
{
xmlhttp.open("GET",phpPage);
xmlhttp.onreadystatechange = function()
{
if(xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
document.getElementById('change_'+clickedLink).innerHTML = xmlhttp.responseText;
}
}
xmlhttp.send(null);
}
}
请告诉我如何,我会解决这个问题?
感谢你。