R
rphooper3
Hello,
for compatibility reasons I have a variable in javascript with periods
in its name, it is based on a hostname and I need to tie that
information to the function.
the variable is function_www.hostname.com
The problem is when I try to run a simple javascipt program on it, the
script fails, probably because of the way javascript uses periods, but
if I remove the periods the script works.
is there anyway to inclose full hostnames within variable names?
here is a sample of the code:
function_www.hostname.com =
document.userchange.function_www.hostname.com.checked;
if (! function_www.hostname.com) {
if (confirm("Do you want this?")) {
document.userchange.function_www.hostname.com.checked = true;
}
}
INPUT TYPE="checkbox" NAME="function_www.hostname.com"
for compatibility reasons I have a variable in javascript with periods
in its name, it is based on a hostname and I need to tie that
information to the function.
the variable is function_www.hostname.com
The problem is when I try to run a simple javascipt program on it, the
script fails, probably because of the way javascript uses periods, but
if I remove the periods the script works.
is there anyway to inclose full hostnames within variable names?
here is a sample of the code:
function_www.hostname.com =
document.userchange.function_www.hostname.com.checked;
if (! function_www.hostname.com) {
if (confirm("Do you want this?")) {
document.userchange.function_www.hostname.com.checked = true;
}
}
INPUT TYPE="checkbox" NAME="function_www.hostname.com"