Hi,
Using SmartClient 8, I'm trying to upload a file to the server. I don't have the Smartclient server stuff
installed, but rather use a custom servlet on my server to handle this.
Here's an extract of the code I have:
The problem I'm facing, is that whenever I issue a submit on my uploadForm, the data gets
posted inside a new browser tab (in FF4) or a new browser window (Chrome) instead of
within the specified/expected IFRAME.
PS1: I had to specify an empty contentsURL property otherwise the HTMLFlow would render as a DIV instead of an IFRAME.
PS2: I had to override the getIFrameHTML because the IFRAME ID property would not render.
Anyone know why the submit action doesn't take place in the IFRAME as it should?
Thanks,
Using SmartClient 8, I'm trying to upload a file to the server. I don't have the Smartclient server stuff
installed, but rather use a custom servlet on my server to handle this.
Here's an extract of the code I have:
Code:
this.uploadForm = DynamicForm.create ({ saveOnEnter : false, canSubmit : true, encoding : DynamicForm.MULTIPART_ENCODING, action : 'servlet/upload', target : 'myUploadFrame', fields : [ { name : 'file', showTitle : false, type : 'binary', width : 250 } ] }); this.uploadFrame = HTMLFlow.create ({ ID : 'myUploadFrame', contentsURL : '', contentsType : 'page', width : 100, height : 100, border : '2px solid black', getIFrameHTML : function (url) { // require overriding this method, because the id attribute doesn't get output in ISC's implementation return '<iframe height="100%" width="100%" scrolling="no" id="' + this.ID + '" frameborder="0"></iframe>'; } }); ... ... this.uploadForm.submit(); ...
posted inside a new browser tab (in FF4) or a new browser window (Chrome) instead of
within the specified/expected IFRAME.
PS1: I had to specify an empty contentsURL property otherwise the HTMLFlow would render as a DIV instead of an IFRAME.
PS2: I had to override the getIFrameHTML because the IFRAME ID property would not render.
Anyone know why the submit action doesn't take place in the IFRAME as it should?
Thanks,
Comment