pero no se muetran el formulario, en los campos del form para size y votos me sale undefined
saludos y gracias
Código PHP:
function EditDownload(id, name, category, icon, description, permissions, link, date, clicks, size, votos) {
var categorybox = document.dm.dm_category;
var categorylen = categorybox.options.length;
var iconbox = document.dm.dm_icon;
var iconlen = iconbox.options.length;
var mod = (permissions == 'yes') ? 0 : 1;
var i;
var j;
document.getElementById('dm_div_remove').style.display = 'none';
document.getElementById('dm_div').style.display = '';
document.getElementById('donwload_name').innerHTML = '<?php _e('Edit Download','downloads-manager'); ?> '+name;
document.dm.dm_id.value = id;
document.dm.dm_name.value = name;
document.dm.dm_date.value = date;
document.dm.dm_clicks.value = clicks;
document.dm.size.value = size;
document.dm.votos.value = votos;
for (i = 0; i < categorylen; i++) {
if (categorybox.options[i].text == category)
categorybox.selectedIndex = i;
}
for (j = 0; j < iconlen; j++) {
if (iconbox.options[j].text == icon) {
iconbox.selectedIndex = j;
document.getElementById('dm_iconpreview').innerHTML = '<img src="<?php echo $plugin_url; ?>/img/icons/'+icon+'" alt="'+icon+'" />';
}
}
document.dm.dm_description.value = description;
document.dm.dm_permissions[mod].checked = true;
if(link.indexOf('<?php echo get_option('siteurl'); ?>')) {
document.dm.dm_link2.value = link;
document.dm.dm_link.disabled = true;
document.dm.dm_upload2link.checked = true;
document.dm.dm_link.options.selected = false;
document.getElementById('fromlink').style.display = '';
}
else {
document.dm.dm_link2.value = '';
document.dm.dm_link.value = link;
document.dm.dm_upload2link.checked = false;
document.getElementById('fromlink').style.display = 'none';
}
document.dm.dm_name.value = name;
document.dm.size.value = size;
document.dm.votos.value = votos;
}