E
emekadavid
What is the source of the error for this code please: I don't know why
the
var textBox refuses to reference the input element with name
as where.
the html code is
<form name="which" action="">
<input type="text" size="60" name="where">
</form>
the accompanying javascript code is:
<script type="text/javascript" language="JavaScript"><!-- Begin
var isReady= false;
var textBox = document.which.where.value;
textBox = " ";
function showAddress(What){
//if the isReady variable is true
if (isReady){
//change the value of the textbox to the argument returned
textBox = What;
//give the input textbox focus and select it
document.which.where.focus();
document.which.where.select();
}
//else if isReady state is false, throw alert
else {
alert("This page is not fully loaded yet." + "\n" +
"Please wait for the page to finish laoding.");
}
}
//-->
</script>
the
var textBox refuses to reference the input element with name
as where.
the html code is
<form name="which" action="">
<input type="text" size="60" name="where">
</form>
the accompanying javascript code is:
<script type="text/javascript" language="JavaScript"><!-- Begin
var isReady= false;
var textBox = document.which.where.value;
textBox = " ";
function showAddress(What){
//if the isReady variable is true
if (isReady){
//change the value of the textbox to the argument returned
textBox = What;
//give the input textbox focus and select it
document.which.where.focus();
document.which.where.select();
}
//else if isReady state is false, throw alert
else {
alert("This page is not fully loaded yet." + "\n" +
"Please wait for the page to finish laoding.");
}
}
//-->
</script>