In the following code:
[code=php]
<html>
<head>
<title>Enter Test</title>
<script type=”text/javascript”>
function EnterInfo(msg) {
document.getElementById(‘TA’).value += msg+”n”;
document.getElementById(‘EnterTxt’).value = ”;
}
</script>
</head>
<body>
<form onSubmit=”return false”>
Enter something here:
<br /><input id=’EnterTxt’ type=”text” value=”” onChange=”EnterInfo(this.value)” />
<br /><textarea id=”TA” rows=”10″></textarea>
</form>
</body>
</html>
In IE, no errors, but nothing happens until I click outside the text box.
Then textbox is appended to textarea as expected.
Why does this not happen when I press ‘ENTER’ key?
In FF, it works as I designed it, but I get an error saying:
[QUOTE]
Error: [Exception… “‘Permission denied to get property XULElement.selectedIndex’ when calling method: [nsIAutoCompletePopup::selectedIndex]” nsresult: “0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)” location: “JS frame :: file:///C:/JS/New%20Folder/EnterText.html :: EnterInfo :: line 7” data: no]
Source File: file:///C:/JS/New%20Folder/EnterText.html
Line: 7
This does not make sense to me?
Anyone have an explaination? Thanks in advance for any response.