flex上传文件
1.flex端
<mx:Button id="upload" label="上传文件" click="ExternalInterface.call('openUpload');"/>
2后台
2.1 openUpload是后台的js脚本(jsp)
function openUpload(){
var url="/OA/service/upload.jsp";
newWin=jscomNewWinOpenBySize(url,"文件上传",350,150);
}
function jscomNewWinOpenBySize(url,target,width,height){
var tt,w,left,top;
if (!width) width=screen.width;
if (!height) height=screen.height-60;
left=(screen.width-width)/2;
if(left<0){ left=0;}
top=(screen.height-60-height)/2;
if(top<0){ top=0;}
tt="toolbar=no, menubar=no, scrollbars=yes,resizable=yes,location=no, status=yes,";
tt=tt+"width="+width+",height="+height+",left="+left+",top="+top;
w=window.open(url,target,tt);
try{
w.focus();
}catch(e){}
return w;
}
upload.jsp
<%@ include file="/service/common.jsp"%>
<%@ page contentType="text/html; charset=gbk" language="java"%>
<html>
<head>
<title>附件上传</title>
<script type="text/javascript" language="javascript">
addEventSimple(window,"load",initial);
function initial(){
o4lukaForm=document.getElementById("lukaForm");
o4myFile1=document.getElementById("myFile1");
o4asslb=document.getElementById("asslb");
o4ahigbg=document.getElementById("ahigbg");
if(o4myFile1.value!=""){
o4lukaForm.submit();
}else{
o4asslb.style.display="block";
}
}
function getFileSize(filePath){
o4asslb=document.getElementById("asslb");
o4asslb.style.display="none";
var image=new Image();
&nbs
相关文档:
Axis简介
技术前沿 2008-04-07 22:42 阅读104 评论0
字号: 大大 中中 小小
1.SOAP简介
企业系统内部各个系统之间的信息交换一直是一个难题,在过去有DCOM、CORBA等解决方案,但都不是很完美,不是太复杂就是有缺陷。现在则较流行SOAP(全称:Simple O ......
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" layout="absolute" xmlns:ns1="com.component.*">
<mx:Script>
<![CDATA[
import com.component.DataHBox;
import com.component. ......
写下这个标题大家一定以为我是只FLEX老鸟,不然不敢这么高声说话,而且是在JAVAEYE里.我知道JE里高手很多.有很多人都对FLEX有秀深的见底,写此文是为了回答一些朋友对我的提问.
有很多想转行的开发者都问我这样几个问题:现在招FLEX的公司多吗?搞FLEX开发工资高吗?怎么样才算是FLEX入门了?怎么才称得上是FLEX高手?
&n ......
1、Subclipse
最近工作中,所有项目都在SVN中进行。由于Flex Builder没有内置SVN支持,很是不便。在编译时,”svn”文件夹会导致一些莫名错误。在编写Flash as时,我现在习惯用Flash Develop,小巧实用,也支持SVN。为了方便,给Flex Builder也装了SVN插件。由于FB基于Eclipse,安装方法都是一样的。
选择 He ......
1、mian.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="HTTPSrv.send();" width="242" height="442">
<mx:Script>
<!--[CDATA[
import mx.rpc.events.ResultEv ......