【发布时间】:2011-02-09 09:43:29
【问题描述】:
我正在使用 zend-framework、iframe、ajax 和 jquery 在单击 DIV 时调用 url。
我正在使用 iframe,如下所示
<iframe src="http://localhost.test.com/public/index/listen-message" name="listenMsg" height="120" width="600">
<p>Your browser does not support iframes.</p>
</iframe>
我在 DIV 中使用了以下代码
<div target="listenMsg" class="text" id="<?php echo $row['id']; ?>">
......
</div>
对于 JQuery,我编写了以下代码.....
$(".text").click(function()
{
var clickedDiv = $(this).attr("id");
var id=$(this).attr("id");
$.ajax({
type: "POST",
url: "http://localhost.test.com/public/index/listen-message",
data: id,
success: function(data){
}
});
return false;
});
但是当我点击DIV“文本”控件时,会转到http://localhost.test.com/public/index/listen-message,但结果没有显示在IFRAME中......?
可能会出现什么问题......?
请提供一些代码、链接和想法......
提前致谢......
【问题讨论】:
标签: php jquery ajax zend-framework iframe