Jump to content


wysiwyg editor problems

  • Please log in to reply
1 reply to this topic

#1 mojito

  • Members
  • PipPipPip
  • Advanced Member
  • 74 posts

Posted 20 June 2006 - 10:49 PM

onclick="if (chkMode.checked) { chkMode.checked=!chkMode.checked;SetMode(); } document.the_form.description.value = tbContentElement.DOM.body.innerHTML;"

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
<input type="hidden" name="description" />

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 object

I need some clues to debug the thing.


mojito [img src=\"style_emoticons/[#EMO_DIR#]/excl.gif\" style=\"vertical-align:middle\" emoid=\":excl:\" border=\"0\" alt=\"excl.gif\" /]

#2 GBS

  • Members
  • PipPipPip
  • Advanced Member
  • 108 posts

Posted 22 June 2006 - 02:52 AM


my mind is that you should better use the 'id' method, instead of the 'name' method. ie:

If I get your idea, you could then try something like:
<div id="description" style="display:none">Testing</div>

& to make the div/element visible:
document.getElementById('description').innerHTML="new contents";

you should get less errors, & the method is working with most~all of modern browsers,

Hoping it helps,,


Sorry for my english,... I do my best, but sometimes,...
1st intention: understand the problem
2nd intention: try to solve it
3rd intention: try to understand how to solve it :)

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users