如何从喜欢用AJAX一个iFrame另一个分区填充XML文档中的DIV? [英] How to populate xml doc in div from another div like an iFrame using ajax?

查看:100
本文介绍了如何从喜欢用AJAX一个iFrame另一个分区填充XML文档中的DIV?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个侧边栏分区的链接,我想起来链接到一些XML文件。 (用XSLT引用其他三个XML文件)我想的XML显示在体分区有点像一个iframe。我不能找到一个很好的解决方案,因为我使用的是浏览器的原生XSL转换,而不是包装的XML成HTML。我一直在寻找到了AJAX的解决方案,但只能发现填充HTML或txt文件的AJAX脚本。我也看了一下jquerys .load()解决方案和MooTools的XMLRPC,但有一点complicatingfor我。我是新使用Ajax和任何帮助或方向将大大AP preciated。这里是一个链接到我的最后一个职位,如果你需要更多的背景资料。 <一href="http://stackoverflow.com/questions/7154507/how-to-display-xslt-in-ie-8-and-chrome-with-javascript-and-three-xml-files">How在IE 8和Chrome的JavaScript和三个XML文件显示XSLT?

I have a "sidebar" div with links that I would like to link up to some xml files. (with xslt that references three other xml files) I would like the xml to be displayed in the "body" div kinda like an iframe. I cannot find a good solution for this as I am using the browser's native XSL transformation and not "wrapping" the xml up into html. I have been looking into an ajax solution but can only find ajax scripts that populate html or txt files. I have also looked at jquerys .load() solution and mootools XMLRPC but is a little complicatingfor me. I am new with ajax and any help or direction would be greatly appreciated. Here is a link to my last post if you need more background info. How to display XSLT in IE 8 and Chrome with javascript and three XML files?

推荐答案

我已经找到了解决办法。我用了一个服务器端的PHP脚本,我发现本网站上 - <一href="http://stackoverflow.com/questions/2128470/how-to-transform-xml-with-xslt-using-php-in-word$p$pss">link 然后,我用这个AJAX脚本加载XML - 链接 它完美。我很开心。现在我想尝试使用PHP脚本扫描来扫描目录,另一个脚本来创建我的新填充XML文档的新链接。有挑战性的 - 是的,我们将拭目以待。任何信息或方向将AP preciated。

I have found a SOLUTION. I used a server side php script I found on this site - link Then I used this ajax script to load the xml - link It works perfectly. I am very happy. Now I would like to try and use a php scan script to scan the directory and another script to create a new link to my new "populated" xml docs. CHALLENGING - yes we will see. Any info or direction would be appreciated.

这篇关于如何从喜欢用AJAX一个iFrame另一个分区填充XML文档中的DIV?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆