我有一个使用 PHP 构建自身的页面,然后使用 Jquery 将一些 SWF 嵌入到具有不同 Flashvars 的页面中,该页面基于 PHP 代码部分中的数据库连接。然后我有一个 jQuery .click(function(){ 此刻会触发一个简单的警报来测试功能 - 这在 Safari 中按预期工作,但由于某些奇怪的原因, .click 在 Firefox 下不会触发?代码如下,有人可以对Firefox问题有所了解:
$(document).ready(function() {
$('#gallery<? echo $count; ?>').flash({
// test_flashvars.swf is the flash document
swf: 'button.swf',
width: 570,
height: 80,
// these arguments will be passed into the flash document
params: {
wmode: 'transparent',
},
flashvars: {
myText: "<?php echo urlencode($row['gal_Title']); ?>"
}
});
$('#gallery<? echo $count; ?>').click(function(){
alert('Alert <?php echo $count; ?>');
});
<?
$count = $count+1;
} else {
}
}
mysql_free_result($GalleryItems);
?>
该页面表面上可以工作,我想我可以将 .click 函数作为 clickVar 移动到 swf,但我希望单击启动 AJAX 调用以更新页面的一部分,这会导致我从 flash 中获取调用时出现问题回到 jQuery 元素 - 不是吗?
非常感谢您的帮助,
毫米