View Full Version : how to get file directory? because i browse the file from the server....

23 Dec 2009, 2:01 AM
because i browse the file from the server....so i need to record the directory/path of the file,so that other user can refer it...
i use a function to add a file field when click a button,here is the code:

function newRulesField(fieldLabel) {
var rulesField = new Ext.form.Field({
fieldLabel: fieldLabel,
name: fieldLabel,
bodyStyle:'padding:7px 10px',
autoCreate : {tag: 'input', type: 'file', size: '35', autocomplete: 'off',method:'POST', enctype:'multipart/form-data'}
return rulesField;
then i add into the form:

form1.add(newRulesField('files' + index));but i can get any value and pass to php using post method...
i try to add a hidden field to store a value from the file field,it work,but just get the value of name of the file, i want to get whole file path....anyone can help? thanks...

maybe we can edit the original class? so that is can get the value which can include whole path of the file?

23 Dec 2009, 2:42 AM
Someone else has asked this today. Search