uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.execCommand]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://127.0.0.1/Classes/Email/scripts/ ... or.pack.js :: anonymous :: line 1" data: no]
What I'm doing is this:
I have a drop down box, so when someone selects an item from the list it inputs a message in the WYM box (grabs from a database). It works fine, but if I type anything in the WYM box and try the drop down menu, it does that.
This is my code... It also seems to add an extra <p></p> in the display window of the WYM box, but it doesn't actually show up in the HTML for the WYM box. I also think the line that shows wym.html(''); could be wrong. I wanted to clear the box before it does the .insert(data)
- Code: Select all
$(document).ready(function() {
jQuery(function() {
jQuery('.wymeditor').wymeditor({
postInit: function(wym){
$('#template_box').bind('change', function(e){
$num = $('#template_box').val();
$.post('admin/ajax.php?action=get_template', {id: $num},
function(data) {
wym.html('');
wym.insert(data);
})
})
}
});
});
})