I'm having a problem with IE, while it works in FF: the var doesn't save any \n aka enter.
I have the following code:
<script type="text/javascript">
function addu() {
var message = window.prompt("Enter the text that needs to be underlined below");
if (message != "" && message != "null") {
document.editform.text.innerHTML += "\[u\]" + message + "\[/u\]";
}
}
</script>
<img src="beheerimages/ubutton.jpg" onClick="addu()" /><br />
<form name='editform'>
<textarea class="editarea" name="text" cols="100" rows="20"><?php echo $row['bbtext']; ?></textarea>
</form>
Does anyone know a answer to this question? As soon as a user presses the ubutton.jpg image, the enters are deleted.
~G
EDIT: the \[ and \] are to prevent the auto-u of daniweb, in the script it is [ and ]