PDA

View Full Version : Html browse button not working in IE9



sachin sachdeva
18 Jul 2012, 2:25 AM
Hi

I am using ext-js 3.4 which works perfectly in IE-9 aprart from one major issue that when we try to render the grid column with input type=browse the browse button starts displaying but in IE9 its not working we have to click on text area twice or thrice to make it work properly.
For Rest of the browsers its working abs. fine

please find the attached screen shot.




My code to render the browse button in editor grid is


COLUMN MODEL


var cm = new Ext.grid.ColumnModel({
autoScroll : true,
monitorValid : true,
defaults : {
sortable : true,
autoScroll : true
},
columns : [{
header : 'Browse',
width : 250,
height : 50,
editable : false,
editoptions : {
readonly : true
},
dataIndex : 'browse',
renderer : function(val, metaData) {
var fileType = "";
if (val.length > 0) {
fileType = val;
} else {
fileType = '<input type="file" id="file' + rowCount + '" name="file' + rowCount + '" />';
}
metaData.css = 'x-grid3-col';
return fileType;
}
}
}]
});
return cm;






GRID



Egrid = new Ext.grid.EditorGridPanel({
store : store,
cm : cm,
autoScroll : true,
autoWidth : true,
height : 393,
renderTo : 'editor-grid',
clicksToEdit : 1,
loadMask : true,
autoScroll : true,
stripeRows : true,
monitorValid : true,

}]
})
});




Please let me know where i am mistaken or is it a bug in extjs3.4

scottmartin
18 Jul 2012, 4:07 PM
Have you tried adding as an editor?



editor : {
xtype: 'fileuploadfield',
fieldLabel: 'Photo',
name: 'photo-path'
}


Scott.

sachin sachdeva
23 Jul 2012, 1:42 AM
Hey......

Thanx Scott

Now the issue is when ever i try to edit it .....then on blur it changes back into normal grid and i am not able to click on browse button .

Please find arrached screen shot.

Is there any way in extjs i can cancel the blur rvrn so that by deafaul there is browse field.

Thanx.

sachin sachdeva
23 Jul 2012, 2:58 AM
hiii....

I found the sol. of this problem...i used code below /:).




editor : new fm.TextField({
inputType : 'file',
minLength : 0,
maxLength : 250
}),



Now the issue is in FIREFOX its showing SECURITY ISSUE.


plz let me know wats this and is there any workaround for this

sachin sachdeva
23 Jul 2012, 10:59 PM
Issuee Fixed.....i found the work around which is working perfectly well....B)



editor : {
xtype : 'fileuploadfield',
buttonOnly : true,
listeners : {
fileselected : {
fn : function(combo, value) {
this.gridEditor.record.set('browseButton',
value);
Egrid.stopEditing();
return;
}
}
}
}





Thanx
Sachin Sachdeva

scottmartin
24 Jul 2012, 6:46 AM
Thank you for the update. It should provide useful to others.

Regards,
Scott.