Jul 19, 2010, 6:07 PM
[CLOSED] Uploading files
Hi, please have a look at the following markup:
When I remove the RenderFormelement="true", the form renders fine. However, now using:
pnlBranchLogo.getForm().submit({ url: ...
later when the button is clicked generates javascript error saying that form.submit() button is not supported (inside Ext.extend(Ext.data.Connection).
Any help would be appreciated!!
<ext:FormPanel runat="server" ID="pnlBranchLogo" FileUpload="true" RenderFormElement="true" Frame="true" Layout="Form" Height="110">
<Items>
<ext:ComboBox runat="server" ID="comboBranchLogo" AllowBlank="false" StoreID="storeBranch" DisplayField="agencyName" ValueField="no"
FieldLabel="Branch" ForceSelection="true" Mode="Local" />
<ext:TextField runat="server" ID="txtBranchLogo" Name="BranchLogo" AllowBlank="false" ButtonText="Select Logo" FieldLabel="Logo Image"
Note="Allowed Files (.bmp, .tif, .gif, .png, .jpg only)" NoteAlign="Down" Width="300">
<CustomConfig>
<ext:ConfigItem Name="inputType" Value="file" Mode="Value" />
</CustomConfig>
</ext:TextField>
<ext:Button runat="server" ID="btnBranchLogo" Text="Submit Logo for Selected Branch" Handler="Bkg.btnBranchLogoClicked" />
</Items>
</ext:FormPanel>
When I use this, I get a javascript exception (htmlfile: Unknown runtime error) at "el.innerHTML = createHtml(o);" line inside Ext.DomHelper.overwrite method, when the FormPanel renders. The contents of object o are: {"tag":"form","cls":"x-panel-body","method":"POST","id":"ext-gen677","enctype":"multipart/form-data"}When I remove the RenderFormelement="true", the form renders fine. However, now using:
pnlBranchLogo.getForm().submit({ url: ...
later when the button is clicked generates javascript error saying that form.submit() button is not supported (inside Ext.extend(Ext.data.Connection).
Any help would be appreciated!!
Last edited by geoffrey.mcgill; Jul 20, 2010 at 10:13 PM.