I can't figure out why the media uploader doesn't show. I'm trying to do a media upload window so the user can upload a file. The problem is, when I click on the Upload button, nothing happens, the window is not shown and I don't know why. I think it has something to do that the submenu in which I want to add the uploader is in a custom post type. The js code for the media upload:
$('#csv_file_button').click(function() {
formfield = $('#csv_file').attr('name');
tb_show('', 'media-upload.php?type=file&TB_iframe=true');
return false;
});
window.send_to_editor = function(html) { // Send WP media uploader response
url = $(html).attr('href');
$('#csv_file').val(url);
tb_remove();
}
Any ideas?