<html:html lang="true">
<head>
<html:base />
<title>event.jsp</title>
<SCRIPT LANGUAGE="javascript" FOR="UserControl1" EVENT="ondata()">
<!--
UserControl1_ScanOK();
-->
</SCRIPT>
<SCRIPT ID="clientEventHandlersJS" LANGUAGE="javascript">
function UserControl1_ScanOK()
{
var xml=UserControl1.get_xml();
alert(xml); window.location.href="showOcx.do?method=ocxEvent&xml="+UserControl1.get_xml();
}
</script>
</head>
<OBJECT
id="UserControl1"
classid="clsid:9295F813-51D4-43A5-918B-4A82B6410176"
codebase="http://192.168.1.24:8080/kj133/ocx/eventProj1.ocx#version=1,1,20,8"
width=350
height=250
align=center
hspace=0
vspace=0
>
<body>
</body>主要是调用eventProj1.ocx控件的get_xml()方法,在执行到alert(xml),可以弹出数据,虽然数据是
乱码,但是在showOcx.do?method=ocxEvent方法里面我用
request.getParameter("xml").length()长度却是0,也就是说数据并没有传到Action里面去,其中
get_xml返回的是字节流,我怎么才能在后台解析它?
<head>
<html:base />
<title>event.jsp</title>
<SCRIPT LANGUAGE="javascript" FOR="UserControl1" EVENT="ondata()">
<!--
UserControl1_ScanOK();
-->
</SCRIPT>
<SCRIPT ID="clientEventHandlersJS" LANGUAGE="javascript">
function UserControl1_ScanOK()
{
var xml=UserControl1.get_xml();
alert(xml); window.location.href="showOcx.do?method=ocxEvent&xml="+UserControl1.get_xml();
}
</script>
</head>
<OBJECT
id="UserControl1"
classid="clsid:9295F813-51D4-43A5-918B-4A82B6410176"
codebase="http://192.168.1.24:8080/kj133/ocx/eventProj1.ocx#version=1,1,20,8"
width=350
height=250
align=center
hspace=0
vspace=0
>
<body>
</body>主要是调用eventProj1.ocx控件的get_xml()方法,在执行到alert(xml),可以弹出数据,虽然数据是
乱码,但是在showOcx.do?method=ocxEvent方法里面我用
request.getParameter("xml").length()长度却是0,也就是说数据并没有传到Action里面去,其中
get_xml返回的是字节流,我怎么才能在后台解析它?
解决方案 »
- 我需要一个党员信息管理系统-java的·
- 100分提问笔记本选购问题
- 将JFreeChart放入Applet里,当通过IE浏览的时候,其它功能都正常,除了右键另存为
- JS的问题,谢谢帮忙,解决了就给分。。
- tomcat报错,jsf+ibat开发的
- 系统集成方案?~~请教
- 为什么(JSP)select中value传的值是0?
- myeclipse在SRC目录下创建servlet之后 没有在class目录下生成.class文件为什么 ?其他的java文件都有class
- 高手指点!Tomcat环境
- java控制台报错
- 有人做过客服系统吗?在web页面点击一个button(或者是链接)怎么才可以产生不同的窗体啊?
- 在JSP里使用smartupload组件上传文件报错:Files' name is invalid or does not exist (1205),请高手指正一下,我贴出相关重要的代码
"showOcx.do?method=ocxEvent&xml="+UserControl1.get_xml(); 如果有的话,你看看数据里有没有&号或特殊字符之类你先把url打出来,然后贴出来看看。
{
var xml=UserControl1.get_xml();既然你这里已经附值了
alert(xml); window.location.href="showOcx.do?method=ocxEvent&xml="+xml;这里直接用xml这个变量么好了
还去取一次 浪费资源
}
alert(xml);
//弹出来的是乱码,当我document.writeln(xml)
//页面上弹出一对话框显示 Abstract Errot ,并且在页面上显示undefined
var url="showOcx.do?method=ocxEvent&xml="+UserControl1.get_xml();
alert(url);
//显示showOcx.do?method=ocxEvent&xml=是不能传值还是怎么着?
method=ocxEvent&xml="+xml;这里直接用xml这个变量么好了
还去取一次 浪费资源
longshenls:
我不是很明白你的意思,可以说仔细点吗?
我现在用VB就能解析它的返回值,我想现在的问题应该是
Javascript能不能获取variant