Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-27-2008, 08:57 AM   PM User | #1
ktsixit
Regular Coder

 
Join Date: Sep 2008
Posts: 106
Thanks: 27
Thanked 3 Times in 3 Posts
ktsixit is an unknown quantity at this point
YUI simple text editor - not saving changes

Hi all,
I'm using the YUI Simple Editor in my page. It's a page for updating data in website and the problem is that the changes I make to the text with the editor, are not saved. Actually the sql query that is submitted to the database contains the old text and not the changed updated text. It seems that changes on text are only visual.

Has anybody faced the same problem with this script? Can you imagine what's the cause for this? Help me pls

the html/php is:
Code:
<textarea id="text" name="text" rows="20" cols="75">
	<?php echo $row_show_new['text']; ?>
</textarea>
and the javascript code that creates editor is:
Code:
<script>
	(function() {
	     var Dom = YAHOO.util.Dom,
	     Event = YAHOO.util.Event;
						
	     var myConfig = {
	     height: '100px',
	     width: '500px',
	     dompath: true,
	     focusAtStart: false
	};
					
	YAHOO.log('Create the Editor..', 'info', 'example');
	var myEditor = new YAHOO.widget.SimpleEditor('text', myConfig);
	myEditor.render();
					
})();
</script>

Last edited by ktsixit; 11-27-2008 at 09:17 AM..
ktsixit is offline   Reply With Quote
Old 06-03-2009, 01:41 AM   PM User | #2
danny_mk
New to the CF scene

 
Join Date: Jun 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
danny_mk is an unknown quantity at this point
Post

This is a quote from the YUI documentation:
...............................................................................
Getting the data from the Editor

There are a couple of ways to get the data from the editor. The first way is to let the Editor do it for you by setting the handleSubmit configuration option.

Setting the handleSubmit configuration option, the Editor will attempt to attach itself to its parent form's submit event. Then it will call its saveHTML method, then proceed with the form submission.
--------------------------------------------------------

simply set
handleSubmit: true
in your configuration options.
danny_mk is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:28 AM.


Advertisement
Log in to turn off these ads.