В данном примере kcfinder прикручен к текстовому полю, как здесь http://kcfinder[dot]sunhater[dot]com/demos/textbox
Подскажите что я делаю не так?
CODE (htmlphp):
скопировать код в буфер обмена
скопировать код в буфер обмена
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>CKEditor Sample</title>
- <meta content="text/html; charset=utf-8" http-equiv="content-type" />
- <script type="text/javascript" src="ckeditor.js"></script>
- <!-- подключаем kcfinder -->
- <script type="text/javascript">
- function openKCFinder(field) {
- window.KCFinder = {
- callBack: function(url) {
- field.value = url;
- window.KCFinder = null;
- }
- };
- window.open('kcfinder/browse.php?type=files&dir=files/public', 'kcfinder_textbox',
- 'status=0, toolbar=0, location=0, menubar=0, directories=0, ' +
- 'resizable=1, scrollbars=0, width=800, height=600'
- );
- }
- </script>
- </head>
- <body>
- <!-- отключаем блокировку kcfinder'a -->
- <?php
- $_SESSION['KCFINDER'] = array();
- $_SESSION['KCFINDER']['disabled'] = false;
- ?>
- <!-- текстовое поле, которое открывает kcfinder -->
- Selected file:
- <input type="text" readonly="readonly" onclick="openKCFinder(this)"
- value="Click here and select a file double clicking on it" style="width:600px;cursor:pointer" />
- </body>
- </html>