在 jquery ui 对话框中加载 swf
我正在使用 fusionCharts 套件中的 fusionmaps。我已经搜索了他们所有的文档和知识库来了解如何做到这一点,但没有运气,所以我正在与你们联系。
我有一个地图(swf 文件),它从 xml 文档获取数据来构建其数据。在该 xml 中,对于特定实体,我可以进行 javascript 调用。在 swf 所在的文件中,我有 JS 和 jquery 库。我最终试图在 UI 对话框中弹出另一个 swf 文件。如果可能的话,我不知道该怎么做。我弹出对话框,但它是空的。我希望放置在那里的 swf 文件会加载到我的其他 swf 文件之上。有什么建议吗?
这是我的一些代码。
<script type="text/javascript"><!--
$(document).ready(function() {
$("#dialogContainer").dialog({
bgiframe: true,
height: 500,
width: 600,
modal: true,
autoOpen: false,
buttons: { "Close": function() { $(this).dialog("close"); }},
show: 'fold',
hide: 'fold'
});
}); //Close ready function
function loadDialog(continent) {
//var url = 'showDetails.cfm?region=' + continent;
//$("#dialogContainer").html('Loading. Please wait...');
$.ajax({
type: "post",
url: 'showDetails.cfm',
cache: false,
//dataType: 'html',
data: 'region=' + continent,
beforeSend: function() {$('#dialogContainer').html('Loading. Please wait...').dialog('open');},
success: function(msg) {$('#dialogContainer').html(msg);},
error: function(msg) {$('#dialogContainer').html(msg);}
});
}
我的 fusionmap 电话
<script type="text/javascript">
var map = new FusionMaps("Maps/FCMap_World8.swf", "Map1Id", "500", "300", "0", "0");
map.setDataURL("WorldData2.xml");
map.render("mapdiv");
</script>
我知道这个问题的可能性不大,但只是希望。感谢您的查看以及您可能有的任何建议。
克里斯
I am using fusionmaps from the fusionCharts suite. I have searched all their documentation and knowledge base to see how to do this but have had no luck, so I am reaching out to you guys.
I have a map (swf file) that takes data from an xml doc to build its data. Within that xml, for a specific entity, I am able to make a javascript call. In the file that the swf is on, I have my JS and the jquery library. I am ultimately trying to get another swf file to popup within the UI dialog box. I am not sure how to do this, if possible. I get the dialog box to popup, but it is empty. The swf file I am wishing to place in there loads on top of my other swf file. Any suggestions?
Here is some of my code.
<script type="text/javascript"><!--
$(document).ready(function() {
$("#dialogContainer").dialog({
bgiframe: true,
height: 500,
width: 600,
modal: true,
autoOpen: false,
buttons: { "Close": function() { $(this).dialog("close"); }},
show: 'fold',
hide: 'fold'
});
}); //Close ready function
function loadDialog(continent) {
//var url = 'showDetails.cfm?region=' + continent;
//$("#dialogContainer").html('Loading. Please wait...');
$.ajax({
type: "post",
url: 'showDetails.cfm',
cache: false,
//dataType: 'html',
data: 'region=' + continent,
beforeSend: function() {$('#dialogContainer').html('Loading. Please wait...').dialog('open');},
success: function(msg) {$('#dialogContainer').html(msg);},
error: function(msg) {$('#dialogContainer').html(msg);}
});
}
My fusionmap call
<script type="text/javascript">
var map = new FusionMaps("Maps/FCMap_World8.swf", "Map1Id", "500", "300", "0", "0");
map.setDataURL("WorldData2.xml");
map.render("mapdiv");
</script>
I know this is a long shot on this question, but just hoping. Thanks for looking and any suggestions you may have.
Chris
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我可以向您转发在 jQuery 模式窗口(对话框)上呈现 FusionCharts 所需的资源和示例代码。
FusionCharts 的相同功能(使用 LinkedCharts)的一个非常不同的实现已在 PowerCharts 代码示例 文档。
在 jQuery 对话框中渲染 FusionCharts 所需的步骤
第 1 步:创建 HTML 对话框容器
在页面上的任何位置,创建一个空白
步骤 2:创建 jQuery 对话框和 FusionCharts 对象
在页面加载(jQuery 文档准备就绪)时,将之前创建的分区转换为 jQuery 对话框。
步骤 3:创建一个函数来加载 FusionCharts
现在,我们创建一个 JavaScript 函数来加载 FusionCharts 并打开对话框。
现在,当需要时,用户可以调用此
loadChartInDialog
函数来打开对话框并加载图表。I can forward you the resources and sample codes needed to render FusionCharts on jQuery modal window (dialog).
A very different implementation of the same (using the LinkedCharts) feature of FusionCharts, has been put up at PowerCharts code samples documentation.
Steps needed to render FusionCharts within jQuery Dialog
Step 1: Create HTML dialog container
Anywhere on your page, create a blank <div> and give it a unique id.
Step 2: Create jQuery Dialog and FusionCharts object
On page load (jQuery document ready) convert the afore-created division into jQuery dialog box.
Step 3: Create a Function to load FusionCharts
Now, we create a JavaScript function that loads FusionCharts and opens the dialog.
Now, when needed, user can call this
loadChartInDialog
function to open the dialog and load the chart.如果您使用的是 FusionCharts 3.2 之前的版本,您需要将图表的 wmode 设置为不透明或透明。
这里有一个示例可以提供帮助:
http://www.igcomm.com/show /maps/drill/jQuery
这里使用了3.1 FusionMaps和3.1.1 FusionCharts。截图如下:
代码如下:
有也下载源代码: http://www.igcomm.com/显示/maps/drill/jQuery/download.zip 。
If you are using FusionCharts earlier to 3.2 version you would need to set the wmode of the chart to opaque or transparent.
There is a sample here which can help :
http://www.igcomm.com/show/maps/drill/jQuery
Here 3.1 FusionMaps and 3.1.1 FusionCharts has been used. a screenshot is as follows:
The code is as follows:
There is download of the source too : http://www.igcomm.com/show/maps/drill/jQuery/download.zip .