Ma ktoś może jakiś pomysł jak to zrobić ? Próbowałem zmieniać szerokość ale mi się nie udaje:
<script type="text/javascript"> $().ready(function() { function Rozmiar(akcja) { // alert (akcja); var id = $('#select').val(); var szerokosc = 650 ; if (id == 0 ){ szerokosc = 650 ; } if (id == 1 ){ szerokosc = 950 ; } if (akcja == "l"){ $('textarea.tinymce').tinymce({ // Location of TinyMCE script script_url : '/tiny_mce/tiny_mce.js', mode : "textareas", language : "pl", // General options theme : "advanced", plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,in
linepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,dir
ectionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,ad
vlist", theme_advanced_buttons1 : "save,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,|,ju
stifyright,justifyfull,styleselect,formatselect,|,fontselect,fontsizeselect", theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,out
dent,indent,blockquote,|,undo,redo,|,link,unlink,image,cleanup,code,|preview,|,fo
recolor,backcolor", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true, theme_advanced_resize_horizontal: true, theme_advanced_source_editor_width : szerokosc, width : szerokosc, height : 500, theme_advanced_resizing_min_height : 499, theme_advanced_resizing_max_height : 500, theme_advanced_resizing_min_width : szerokosc, theme_advanced_resizing_max_width : szerokosc, // Example content CSS (should be your site CSS) content_css : "/style/tinymce.css", template_replace_values : { username : "Some User", staffid : "99999" } }); } if (akcja == "p"){ $("#tiny_parent").hide(); Rozmiar("l"); } alert("szerokość "+szerokosc ); } $("#select").change(Rozmiar("p")); Rozmiar("l"); }); </script>
Na dzień dobry okno się ładuje w rozmiarze taki jaki jest wybrany. Jednak skrypt nie reaguje na change . Alerty z rozmiarami są ale rozmiar się nie zmienia .