views:

293

answers:

1

I have been workin on this for a while and I think I really need help! I am using struts 2.1.6 with struts2.1.6_dojo_plugin+ Spring. This is my Java Script code in the Page

<%@ taglib prefix="sx" uri="/struts-dojo-tags"%><head>
<sx:head cache="true" />
<link rel="stylesheet" href="/css/default.css" media="screen" type="text/css" />
<script language=JavaScript src="/js/calendar/datepick.js"></script>
<script language=JavaScript src="/js/application/enableUploadButton.js" type="text/javascript"></script>
<script type="text/javascript">
        dojo.require("dojo.io.IframeIO");
        function sendToServer(formId, indicatorId, viewId) {
        alert("Inside sendtoserver");
        document.getElementById(indicatorId).style.display = '';
        var bindArgs = {
        transport: "IframeTransport",
        formNode: formId,
        mimetype: "text/html",
        load: function(type, data, evt) {
        document.getElementById(viewId).innerHTML = data.firstChild.innerHTML;
        document.getElementById(indicatorId).style.display = 'none';
    }
};var request = dojo.io.bind(bindArgs); } </script>

The body of the jsp page page looks something like this:

<div style="border: solid #dedede 1px; padding: 3px;">
                     <s:form theme="simple" action="attachFile" id="attachFileForm" method="post" enctype="multipart/form-data" onsubmit="sendToServer('attachFileForm', 'uploadingFileInd', 'attachedFilesView'); return false;">
                        <s:file id="fileSelect" size="50" name="fileUpload.file"/>
                        <sx:submit transport="IframeTransport" showLoadingText="false" value="%{'Attach File'}" indicator="uploadingFileInd"/>
                        <img id="uploadingFileInd" src="/jctaylor/images/loader.gif" style="display: none;" />
                    </s:form>
                </div>

My jsp page looks like this form <s:form> ----many field---the above code--</s:form>

I am not even able to get to the alert() section in my java script code.

please suggest me whats wrong.

A: 

So I assume there is no answer for this question?

Sameer Malhotra