function select_file (selected_file) {
if (!selected_file) return false;
// Get window arguments as object
var
temp_array = window.location.search.substring(1).split('&'),
params = {},
tmp,
i
;
for (i = temp_array.length; i-- > 0;) {
tmp = temp_array[i].split('=');
params[tmp[0]] = tmp[1];
}
if (params.CKEditorFuncNum) {
// Call CKEditor function to insert the URL
window.opener.CKEDITOR.tools.callFunction(params.CKEditorFuncNum, selected_file);
// Close Window
window.close();
} else {
// Else do nothing
return false;
}
}
Re: Refresh Box after upload/browse
function select_file (selected_file) { if (!selected_file) return false; // Get window arguments as object var temp_array = window.location.search.substring(1).split('&'), params = {}, tmp, i ; for (i = temp_array.length; i-- > 0;) { tmp = temp_array[i].split('='); params[tmp[0]] = tmp[1]; } if (params.CKEditorFuncNum) { // Call CKEditor function to insert the URL window.opener.CKEDITOR.tools.callFunction(params.CKEditorFuncNum, selected_file); // Close Window window.close(); } else { // Else do nothing return false; } }or use some exist file/image manager.