PDA

View Full Version : [CLOSED] Multi uploaded member not found error in IE.



speedstepmem4
Aug 21, 2014, 4:42 AM
Hi,

As the updated Ext 2.5 version supports Multi upload we are using this feature for the easier access!
But we are facing some issues in the implementation.

Please verify this code part and the attached screenshot to have a look at the error message thrown.




<%@ Page Language="C#" %>
<!DOCTYPE html>

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" Namespace="Sample">
</ext:ResourceManager>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<ext:Viewport ID="ViewPort1" runat="server" Layout="FitLayout">
<Content>
<ext:Container ID="BorderLayout" runat="server" Layout="FitLayout">
<Items>
<ext:GridPanel ID="UploadGrid" runat="server" ForceFit="true" StyleSpec="width:100%">
<Store>
<ext:Store ID="storeGrid" runat="server">
<Model>
<ext:Model ID="Model1" runat="server" IDProperty="id">
<Fields>
<ext:ModelField Name="id" />
<ext:ModelField Name="name" />
<ext:ModelField Name="size" />
<ext:ModelField Name="status" />
<ext:ModelField Name="progress" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column ID="Column1" runat="server" Text="File Name" DataIndex="name" Width="150" />
<ext:Column ID="Column2" runat="server" Text="Size" DataIndex="size" Width="60">
<Renderer Format="FileSize" />
</ext:Column>
<ext:Column ID="Column3" runat="server" Text="Status" DataIndex="status" Width="60" />
<ext:ProgressBarColumn ID="ProgressBarColumn1" runat="server" Text="Progress" DataIndex="progress" />
</Columns>
</ColumnModel>
<BottomBar>
<ext:Toolbar ID="Toolbar1" runat="server">
<Items>
<ext:MultiUpload ID="UploadData" runat="server" FileTypes="*.xml" FileUploadLimit="1">
<FlashButton Action="SELECT_FILE" />
<Listeners>
<FileSelected Fn="fileSelection" />
<UploadStart Handler="updateRecord(file.id, 'status', 'Sending');" />
<UploadComplete Handler="updateRecord(file.id, 'progress', 1 );updateRecord(file.id, 'status', 'Uploaded' );" />
<UploadRemoved Handler="var store = this.up('grid').store; store.remove(store.getById(file.id));" />
<AfterRender Handler="this.flashButton = null; this.createUploadButton();" />
</Listeners>
</ext:MultiUpload>
<ext:ToolbarSeparator />
<ext:Button ID="btnUpload" runat="server" Text="Upload">
<Listeners>
<Click Delay="1" Handler="#{UploadData}.startUpload();" />
</Listeners>
</ext:Button>
<ext:Button ID="btnCancel" runat="server" Text="Cancel">
<Listeners>
<Click Delay="1" Handler="CancelUpload();" />
</Listeners>
</ext:Button>
</Items>
</ext:Toolbar>
</BottomBar>
</ext:GridPanel>
</Items>
</ext:Container>
</Content>
</ext:Viewport>
</form>
<script type="text/javascript">
function CancelUpload() {
var selectedData = Sample.UploadGrid.getSelectionModel().getSelection ();
if (selectedData.length == 0) {
All(info_rowselect);
}
else {
Sample.UploadData.removeUpload(selectedData[0].getId());
}
}
var fileSelection = function (item, file) {
this.up('grid').store.add({
id: file.id,
name: file.name,
status: 'Pending',
progress: 0
});
}

var updateRecord = function (id, field, value) {
var rec = Sample.UploadGrid.store.getById(id);

rec.set(field, value);
rec.commit();
};

</script>
</body>
</html>



As this cause member not found error as shown in the below attachment, we are not able to add attachment in our project.
Please guide us!

Daniil
Aug 21, 2014, 8:49 AM
Hi @speedstepmem4,

Your code doesn't reproduce the problem for me.

Vladimir
Aug 21, 2014, 9:09 AM
What script is located at 1084 line?

I suggest to activate debugging possibility in IE and run the page under VS debug. All javascript errors will be intercepted by VS and you will be able to debug javascript code

speedstepmem4
Aug 25, 2014, 9:39 AM
Hi,

As per your suggestion when we move ahead, still it's causing same problem.
As we have already mentioned in the above code part, no extra lines are added.
We are attaching two more screen shots for your reference. Do refer those and help us, indeed we are not able to proceed.

Daniil
Aug 25, 2014, 11:14 AM
It looks like you have a Flash player version lower than the minimum required. Please look at this post:
http://forums.ext.net/showthread.php?42201&p=191481&viewfull=1#post191481

speedstepmem4
Aug 26, 2014, 4:56 AM
Hi Daniil,

Thank you for the guidance that you provided in this case.
We already tried with the mentioned code



If MultiUpload widget is added to the page then you can use the following script to check Flash
if(swfobject.hasFlashPlayerVersion("9.0.115"))
{
alert("You have the minimum required flash version (or newer)");
}
else
{
alert("You do not have the minimum required flash version");
}


and still we are facing the same issue.
Please refer the attached screen shot after adding the code part in script and do guide us!

Daniil
Aug 26, 2014, 6:34 AM
I cannot reproduce it.

Please debug the JavaScript code where the error happens. What is the content of the "Z" variable?

The JavaScript error message is "Member not found". What exactly "Member"?