没有调用Javascript程序 [英] Javascript program not being called

查看:51
本文介绍了没有调用Javascript程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网页试图调用一段Javascript,其中
尝试将xml文件和xslt文件转换为Html。


电话在这里(A):


< script language =" JavaScript" src =" customfeed.html?Ga_Id = 36475"

type =" text / javascript">< / script>


脚本是这里(B):


< script language =" JavaScript" type =" text / javascript">

var dataArray = new Array();

var querystring = window.location.href;

dataArray = window.location.href.split(" =");

for(j = 0; j< dataArray.length; j ++)

{< br $>
eval(dataArray [j])

}

theXML = new ActiveXObject(" Microsoft.XMLDOM");

theXML.async = false;

theXML.load(" xmlfeed.asp?Ga_Id =" + eval(dataArray [1]));

theXSL = new ActiveXObject(" Microsoft.XMLDOM");

theXSL.async = false;

theXSL.load(" stylesheet01.asp?Ga_Id =" + eval( dataArray [1]));

document.write(theXML.transformNode(theXSL));

< / script>


当在页面上查看源代码时,我得到(A)而不是我期望的,

这是在xslt文件中创建的Html表,并填充了数据
$ b来自xml文件的$ b。两个文件都有asp扩展,因为它们使用asp代码。我已经尝试将这个脚本作为html文件运行,它是在隔离的情况下运行的,但是在调用时没有




任何帮助将不胜感激


John

I have a web page that attempts to call a piece of Javascript, which
attempts to transform an xml file and an xslt file into Html.

The call is here (A) :

<script language = "JavaScript" src = "customfeed.html?Ga_Id=36475"
type="text/javascript"></script>

The script is here (B) :

<script language = "JavaScript" type = "text/javascript">
var dataArray = new Array();
var querystring = window.location.href;
dataArray = window.location.href.split("=");
for (j=0;j<dataArray.length;j++)
{
eval(dataArray[j])
}
theXML = new ActiveXObject("Microsoft.XMLDOM");
theXML.async=false;
theXML.load("xmlfeed.asp?Ga_Id=" + eval(dataArray[1]) );
theXSL = new ActiveXObject("Microsoft.XMLDOM");
theXSL.async = false;
theXSL.load("stylesheet01.asp?Ga_Id=" + eval(dataArray[1]) );
document.write(theXML.transformNode(theXSL));
</script>

When viewing source on the page, I get (A) instead of what I would expect,
which is an Html table created in the xslt file, and populated with data
from the xml file. Both files have asp extensions as they use asp code. I
have tried to run this script as an html file, it runs in isolation, but not
when called.

Any help would be appreciated

John

推荐答案

John D写道:
John D wrote:
我有一个网页试图调用一段Javascript,它试图将xml文件和xslt文件转换为Html。

电话在这里( A):

< script language =" JavaScript" src =" customfeed.html?Ga_Id = 36475"
type =" text / javascript">< / script>
I have a web page that attempts to call a piece of Javascript, which
attempts to transform an xml file and an xslt file into Html.

The call is here (A) :

<script language = "JavaScript" src = "customfeed.html?Ga_Id=36475"
type="text/javascript"></script>




您是否被允许HTML中等号周围的空格?


您可能遇到媒体类型问题。将JS源代码放在.js文件中,

并在脚本属性中设置类型:


< script type =" text / javascript" src =" ...">< / script>


验证员可能会告诉你大部分内容。


-

马克。



Are you allowed spaces around the equal signs in HTML?

You may be having media type problems. Put the JS source in a .js file,
and set the type in the script attribute:

<script type="text/javascript" src="..."></script>

The validator would probably have told you most of that.

--
Mark.


> >我有一个网页试图调用一段Javascript,
> > I have a web page that attempts to call a piece of Javascript, which
尝试将xml文件和xslt文件转换为Html。
attempts to transform an xml file and an xslt file into Html.


The validator would probably have told you most of that




感谢您的回复


这是一个JavaScript验证器吗?如果是这样你能指出我的方向吗?


John



Thanks for the reply

Is this a JavaScript validator? If so can you point me in that direction?

John


John D写道:
John D wrote:
我有一个网页试图调用一段Javascript,它试图将xml文件和xslt文件转换为Html。
I have a web page that attempts to call a piece of Javascript, which
attempts to transform an xml file and an xslt file into Html.



验证器可能会告诉你大部分内容



The validator would probably have told you most of that



感谢您的回复

这是一个JavaScript验证器?如果是这样,你能指出我的方向吗?

John


Thanks for the reply

Is this a JavaScript validator? If so can you point me in that direction?

John



language =" JavaScript"


根本不需要。


-

x theSpaceGirl(miranda)


#lead designer @ http://www.dhnewmedia.com

#删除垃圾邮件,或使用网站上的表格#


language = "JavaScript"

That''s not needed at all.

--
x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #


这篇关于没有调用Javascript程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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