Log in

View Full Version : dynamic ajax text area problem...



thenajsays
09-04-2009, 04:21 PM
ok, right now i have a content management page with a dropdown to select the page in which youd like to edit content. there are three input fields below that, a textbox input for the title tags, a textarea input for the meta description and a textarea input for the actual page content.
the text area containing the page content is also supposed to accept HTML formatting... i did some preliminary testing with like this and checked to see how it would show up in various browsers:

<textarea><p>my <b>test</b> text</p></textarea>
this all showed up just how i wanted it, with "<p>my <b>test</b> text</p>" in the textarea input. when i put this theory into practice with some ajax magic, it works in FF & IE8, but in chrome and IE6, it malfunctions and displays nothing in the page content textarea input... any ideas?

EisBear
09-10-2009, 02:35 PM
Send more code please

The insertion works for me


<head>
<script>
function ChangeAreaContent () {
var textarea = document.getElementById ("textarea");
textarea.value = "<p>my <b>test</b> text</p>";
}
</script>
</head>
<body>
<button onclick="ChangeAreaContent ()">Put text into textarea</button>
<textarea id="textarea">qweqweqweqwe</textarea>
</body>

thenajsays
09-10-2009, 06:12 PM
i gave up... iit was only causing a problem if i tried to do it with AJAX, i jst rewrote the pages