Показать сообщение отдельно
  #1 (permalink)  
Старый 03.12.2007, 21:50
Новичок на форуме
Отправить личное сообщение для maniac Посмотреть профиль Найти все сообщения от maniac
 
Регистрация: 03.12.2007
Сообщений: 2

tinyMCE, jQuery, пустая textarea
tinyMCE.init({
	mode : "none",
	theme : "simple",
	relative_urls : false
});
function commentThis(id) {
	(function() {
		tinyMCE.execCommand('mceRemoveControl', false, 'comment_body')
		return (function() {$("#commentForm").slideUp('fast').remove()})
	})()();
	
	var commentCode = '<form id="commentForm" action="'+base_path+'/blog/'+id+'/" method="POST"><table style="width:100%">\
<tr><td style="color:#000;">Write comment:</td><td style="text-align:right"><input type="submit" name="send" value="Post &rarr;"><a name="commentForm"></a></td></tr>\
<tr><td colspan="2"><textarea name="comment_body" id="comment_body" style="width:100%;"></textarea></td></tr>\
</table></form>'
	$(commentCode).hide().appendTo('div.post_'+id+'#MAIN-BLOG-CONTAINER')
	tinyMCE.execCommand('mceAddControl', false, 'comment_body')
	tinyMCE.execCommand('mceFocus', false, 'comment_body')
	$('#commentForm').slideDown('slow',function() {	})
}


commentThis вызывается на онклик ссылки.
tinyMCE нормально появляется, но в POSTе comment_body пустое
Ответить с цитированием