J
joe
Hi Everyone, could anyone comment on the following problem:
I have a textbox being appended to a cell in a table, and
am trying to call focus() on like this:
<snip>
c01.removeChild(answerbox);
answerbox=document.createElement('input');
answerbox.addEventListener("change",check_answer,false);
answerbox.style.fontSize=FONTSIZE;
answerbox.style.backgroundColor=COLOR_ANSWBG;
answerbox.style.foregroundColor=COLOR_ANSWFG;
answerbox.style.color=COLOR_ANSWFG;
answerbox.style.width="100";
answerbox.style.align="center";
if(n1<13){
c01.appendChild(answerbox);
answerbox.focus();//THIS IS THE LINE CALLING FOCUS()****
tstart=new Date().getTime();
}
</snip>
And my Firefox JavaScript console generates one of these:
<snip>
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 ::
http://asymptopia.org/MathVolcano/mv04.js :: update_display :: line
285" data: no]
Source File: http://asymptopia.org/MathVolcano/mv04.js
Line: 285
</snip>
Line 285 is the "answerbox.focus();" line.
TIA for any help!
-Joe
I have a textbox being appended to a cell in a table, and
am trying to call focus() on like this:
<snip>
c01.removeChild(answerbox);
answerbox=document.createElement('input');
answerbox.addEventListener("change",check_answer,false);
answerbox.style.fontSize=FONTSIZE;
answerbox.style.backgroundColor=COLOR_ANSWBG;
answerbox.style.foregroundColor=COLOR_ANSWFG;
answerbox.style.color=COLOR_ANSWFG;
answerbox.style.width="100";
answerbox.style.align="center";
if(n1<13){
c01.appendChild(answerbox);
answerbox.focus();//THIS IS THE LINE CALLING FOCUS()****
tstart=new Date().getTime();
}
</snip>
And my Firefox JavaScript console generates one of these:
<snip>
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 ::
http://asymptopia.org/MathVolcano/mv04.js :: update_display :: line
285" data: no]
Source File: http://asymptopia.org/MathVolcano/mv04.js
Line: 285
</snip>
Line 285 is the "answerbox.focus();" line.
TIA for any help!
-Joe