Total members 11895 |It is currently Mon Dec 30, 2024 6:15 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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




Author:
Proficient
User avatar Posts: 280
Have thanks: 1 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).

_________________
Please recommend my post if you found it helpful


Author:
Proficient
User avatar Posts: 228
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.


Author:
Newbie
User avatar Posts: 1
Have thanks: 0 time
Post new topic Reply to topic  [ 3 posts ] 

  Related Posts  to : Struts2 upload file and ajax
 upload file in ajax     -  
 Upload PDF file in php     -  
 JSP to Upload File     -  
 File Upload in JSP     -  
 Upload PHP file code     -  
 Upload File to a new directory     -  
 PHP HTML form with to file upload     -  
 Load file and update content using AJAX and JQuery     -  
 How to save a search fields...in Struts2.0     -  
 What is AJAX, How to start AJAX?     -  



cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com