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=docum ent.createEleme nt('input');
answerbox.addEv entListener("ch ange",check_ans wer,false);
answerbox.style .fontSize=FONTS IZE;
answerbox.style .backgroundColo r=COLOR_ANSWBG;
answerbox.style .foregroundColo r=COLOR_ANSWFG;
answerbox.style .color=COLOR_AN SWFG;
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... "'Permissio n denied to get property
XULElement.sele ctedIndex' when calling method:
[nsIAutoComplete Popup::selected Index]" nsresult: "0x8057001e
(NS_ERROR_XPC_J S_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.focu s();" 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=docum ent.createEleme nt('input');
answerbox.addEv entListener("ch ange",check_ans wer,false);
answerbox.style .fontSize=FONTS IZE;
answerbox.style .backgroundColo r=COLOR_ANSWBG;
answerbox.style .foregroundColo r=COLOR_ANSWFG;
answerbox.style .color=COLOR_AN SWFG;
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... "'Permissio n denied to get property
XULElement.sele ctedIndex' when calling method:
[nsIAutoComplete Popup::selected Index]" nsresult: "0x8057001e
(NS_ERROR_XPC_J S_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.focu s();" line.
TIA for any help!
-Joe
Comment