inputF = document.createElement('input');
inputF.type = 'file';
inputF.onchange = inputF_onChange;
tbl = crmForm.all.tab0.getElementsByTagName('table');
if (tbl && tbl[0]) tbl[0].parentNode.insertBefore(inputF, tbl[0]);
function inputF_onChange() {
if (inputF && inputF.value)
crmForm.all.new_filepath.DataValue = inputF.value;
}Here's a list the members exposed by the input type=file object.
http://msdn.microsoft.com/en-us/library/ms535263(VS.85).aspx
It should be noted that the above example will not work for IE8 as JavaScript can no longer read the full path from the value property.
As an alternative I would recommend trying a more supported method, for example, create an ISV page with the input file control and read the path server side and use javascript to populate the control on the parent CRM form.
0 comments:
Post a Comment