mojito Posted June 20, 2006 Share Posted June 20, 2006 [code]onclick="if (chkMode.checked) { chkMode.checked=!chkMode.checked;SetMode(); } document.the_form.description.value = tbContentElement.DOM.body.innerHTML;"[/code]the above is the javascript on a form which submits other fields and a wysiwyg editor which appears to come into a hidden field labeled "description" like [code]<input type="hidden" name="description" />[/code]Since i added another field there are problem with the javascript and i now get the following error in the i.e. dialogue document.the_form.description.value is null or not an objectI need some clues to debug the thing. thanksmojito [img src=\"style_emoticons/[#EMO_DIR#]/excl.gif\" style=\"vertical-align:middle\" emoid=\":excl:\" border=\"0\" alt=\"excl.gif\" /] Quote Link to comment https://forums.phpfreaks.com/topic/12494-wysiwyg-editor-problems/ Share on other sites More sharing options...
GBS Posted June 22, 2006 Share Posted June 22, 2006 Hi,,my mind is that you should better use the 'id' method, instead of the 'name' method. ie:document.getElementById('description').valueIf I get your idea, you could then try something like:<div [b]id[/b]="description" style="display:none">Testing</div>& to make the div/element visible:document.getElementById('description').innerHTML="new contents";document.getElementById('description').display='block';you should get less errors, & the method is working with most~all of modern browsers,Hoping it helps,,l8tr, Quote Link to comment https://forums.phpfreaks.com/topic/12494-wysiwyg-editor-problems/#findComment-48348 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.