Total members 9951 | Gratitudes |It is currently Sat Feb 11, 2012 10:33 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 3 posts ] 
Author Question
 Question subject: Struts2 upload file and ajax
PostPosted: Tue Oct 21, 2008 8:21 pm 
Offline
Proficient
User avatar

Joined: Sun Oct 19, 2008 3:47 pm
Posts: 281
Has thanked: 0 time
Have thanks: 1 time

Hi,

I am trying to use ajax div and file control in same form.
But div is not loading properly instead it shows [object HTMLDocument]
on firefox and [object] on IE. But if I try to use them separately then
both are working fine. Anyone has has any idea what is happening ???
Here is the code
Code:
/*******************************************************************************\
******************************


<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<s:head theme="ajax" />
<link href="<s:url value="/css/campaign.css"/>" rel="stylesheet"
   type="text/css"/>
     <title>upload and ajax test</title>
</head>
<script>
  function changeApplication()

{
        dojo.event.topic.publish("change_Application");
  }
  </script>
<body>
<s:url id="updateSecondList" action="updateSecondList" />
   
    <s:actionerror />
    <s:fielderror />
     <s:form id="test_form" name="test_form" action="FileAction"
method="POST" theme="ajax" enctype="multipart/form-data">
     
         <s:select
             label="First List"
            list="firstList"
            name="selectedItem"
            onchange="javascript:changeApplication();return false;">
        </s:select>
       
        <tr>
        <td class="tdLabel"><label class="label">Second List</label></td>
        <td>
   
    <s:div showLoadingText="false"
             id="details" href="%{updateSecondList}" theme="ajax"
             listenTopics="change_Application" formId="test_form">
         </s:div>                           
        </td>
       
</tr>
       
        <s:file name="upload" label="File"/>
        <s:submit />
     </s:form>
</body>
</html>
/*******************************************************************************\
**************************/

Regards


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: Struts2 upload file and ajax
PostPosted: Tue Oct 21, 2008 8:38 pm 
Offline
Proficient
User avatar

Joined: Sun Oct 19, 2008 3:53 pm
Posts: 229
Has thanked: 0 time
Have thanks: 0 time
A program is said "thread safe" if it handles properly the concurrency
issues (problems and their solutions) when using multiple threads.

"Thread Safe" means that the code will react the same no matter how many
threads are accessing the data at the same time. This can mean:
1) It is known beyond any doubt that only one thread at a time will ever
access the data.
2) There are no class (i.e., "static") variables.
3) There are class / static variables, but all code accessing them is
somehow labelled "synchronized" (which guarantees that only one thread
at a time will run the specified code).


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: Struts2 upload file and ajax
PostPosted: Sun May 23, 2010 1:52 pm 
Offline
Newbie
User avatar

Joined: Sun May 23, 2010 1:49 pm
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
Hi! Did anybody find any solution to this problem? In my case, the form itself is not getting submitted. Please help.


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 3 posts ] 
Quick reply


  


 Similar topics
 Topic title   Forum   Author   Comments 
 Sending One lakh character in ajax  AJAX  Anonymous  0
 Ajax Source code to Suggest application with JSP Server side  AJAX  msi_333  5
 [Ajax/PHP] Registration - Check for empty textboxs  AJAX  PF2G  0
 How to make PHP form data saved into txt file  PHP  Radu  6
 file exists in upper level folder link  HTML examples  msi_333  0

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team