Mam wielki problem. Próbuję zrobić formularz w popup w jquery dialog z użyciem CKeditor.
Wszystko byłoby ok, gdybym miał tylko wywołać okno z dialogu z CKeditor, ale gdy zacząłem dodawać przyciski to pojawiły się problemy. Nie wyświetla się.
Jak naprawić ten kod, aby w wyświetlonym oknie dialog był funkcjonujący formularz. Po naciśnięciu 'OK' ma on wysyłać metodą $POST dane z TEXTAREA do pliku xxx.php z użyciem CKeditora.
<script> $(function() { $('#opener').click(function(){ $('#dialog').dialog('open'); $('#dialog textarea').ckeditor(); }); $(function(){ $('#dialog').dialog({ autoOpen:false, modal: true, width: 745, position: ['center','center'], open: function() { /** * Hide error box and clear message text */ $(this).find('.error').hide(); $(this).find(':input[name="body_header"]').val(''); }, buttons: { 'Ok': function() { alert($(this).find('#body_header').val()); //zamiast alertu ma wysyłać dane z textarea do pliku xxx.php }, 'Cancel': function() { $(this).dialog('close'); } }, close:function(){ var editor = $('#dialog textarea').ckeditorGet(); editor.destroy(); } }); }); }); </script>
Kod w html to:
<div align="left" style="display:block; position:absolute; z-index:10" > <td width="79%" height="124" valign="top" align="left" OnMouseOver="this.style.backgroundColor=''; this.style.zIndex=100;" OnMouseOut="this.style.backgroundColor='transparent';"> tresc</td> </div> <div id="dialog" style=" float: left; background-color:white; display:none; ">Napisz do mnie </div>