C
crb
I'm trying to test some ideas for a typing accelerator using
JavaScript with Firefox and I've got error that's got me, but then I
must say my JavaScript is lacking. The script works till I add an help
feature which basically at the start overlays the user's TEXTAREA with
description of the application. To start writing one clicks on a
'Continue' button and the TEXTAREA come up and one is suppose to start
writing. Well when clicking 'Continue' there is a flash of a TEXTAREA
but then I get:
File not found
Firefox can't find the file at /home/rick/feDD/return false;?.
* Check the file name for capitalization or other typing
errors.
* Check to see if the file was moved, renamed or deleted.
Try Again
My code for the help object is:
function help(node, helpText){
this.text = '<P ALIGN=CENTER><FONT SIZE=4><B>FE 2007</B></FONT></P>
<P><META NAME="CHANGEDBY" CONTENT="Rick Berger"><FONT SIZE=2>1. FE
2007 is a prototype to test and demonstrate features for a typing
accelerator(word completion program) to assist in writing. ... </
FONT> </P>';
this.preHelp = node;
this.node = this.preHelp;
if( helpText ) {
this.text = helpText;
}
this.branch = document.createElement("div");
this.branch.innerHTML = this.text;
this.toggle = function () {
var replacement = this.on ? this.preHelp : this.branch;
this.node.parentNode.replaceChild(replacement, this.node);
this.node = replacement;
this.on = !this.on;
return true;
}
this.on = false;
this.toggle();
}
And I bind its toggle function to the 'Continue' button with this
code:
feHelp = new help(usersTA);
document.getElementById("feContinueHelp").onclick= function()
{ feHelp.toggle(); };
Can anybody give me any suggestions on what I'm missing?
crb
JavaScript with Firefox and I've got error that's got me, but then I
must say my JavaScript is lacking. The script works till I add an help
feature which basically at the start overlays the user's TEXTAREA with
description of the application. To start writing one clicks on a
'Continue' button and the TEXTAREA come up and one is suppose to start
writing. Well when clicking 'Continue' there is a flash of a TEXTAREA
but then I get:
File not found
Firefox can't find the file at /home/rick/feDD/return false;?.
* Check the file name for capitalization or other typing
errors.
* Check to see if the file was moved, renamed or deleted.
Try Again
My code for the help object is:
function help(node, helpText){
this.text = '<P ALIGN=CENTER><FONT SIZE=4><B>FE 2007</B></FONT></P>
<P><META NAME="CHANGEDBY" CONTENT="Rick Berger"><FONT SIZE=2>1. FE
2007 is a prototype to test and demonstrate features for a typing
accelerator(word completion program) to assist in writing. ... </
FONT> </P>';
this.preHelp = node;
this.node = this.preHelp;
if( helpText ) {
this.text = helpText;
}
this.branch = document.createElement("div");
this.branch.innerHTML = this.text;
this.toggle = function () {
var replacement = this.on ? this.preHelp : this.branch;
this.node.parentNode.replaceChild(replacement, this.node);
this.node = replacement;
this.on = !this.on;
return true;
}
this.on = false;
this.toggle();
}
And I bind its toggle function to the 'Continue' button with this
code:
feHelp = new help(usersTA);
document.getElementById("feContinueHelp").onclick= function()
{ feHelp.toggle(); };
Can anybody give me any suggestions on what I'm missing?
crb