struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xianwinwin <xianwin...@gmail.com>
Subject ajax upload file - error message [Object] when returning a div.
Date Mon, 07 Apr 2008 15:42:43 GMT

Hi there,

can anyone adivse how to return a 'Success message' to a div after a file
was uploaded?
For some reason, I get this annoying message [Object] after a file was
successfully uploade. This is caused because I return a message to a div
(without it, it works ok - but the page is refreshed)

code: 
<%@ taglib prefix="s" uri="/struts-tags" %>

<%
    request.setAttribute("decorator", "none");
    response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
    response.setHeader("Pragma","no-cache"); //HTTP 1.0
    response.setDateHeader ("Expires", 0); //prevents caching at the proxy
server
%>
 <head>
    <s:head theme="ajax" debug="true"/>
  </head>
 

<s:form action="files_insertFile" method="POST"
enctype="multipart/form-data" cssStyle="font-size :	8pt; font-family:
verdana"  >
         
         <s:file size="33" name="upload" label="File"/>          
         
    <s:submit action="files_insertFile" theme="ajax"
targets="id_result_success_file" showLoadingText="false"
indicator="loadingImage"/> 	
        
</s:form>

<s:div id="id_result_success_file" theme="ajax"></s:div>

* the code runs smoothly and return a jsp page with a confirmation (success)
* using both IE7 and FireFox - same error
* no error on the javascript [fireBug]
-- 
View this message in context: http://www.nabble.com/ajax-upload-file---error-message--Object--when-returning-a-div.-tp16537519p16537519.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message