I recently upgraded the components on one of my web servers from Ubuntu 8.04 to 12.04 followed by newer versions of Apache, PHP, et al. On my sites that use js functions to alter field attributes they suddenly stopped working. I've been beating my head in trying to figure out what changed. Also, I am NOT a js developer. I do just enough as needed (aka: be dangerous). My current versions of components are:
Apache 2.2.22, php 5.4.9-4
and I know that the js runs in the client side browser but as it is a development question I am posting here.
Here's a little snippet of code that runs on an onChange event:
// function to obtain selected game parameters and hide/unhide input blocks
function cnl_setPrompts() {
var _maxe=Number(Ginfo['_maxe']);
var _bmaxe=Number(Ginfo['_bmaxe']);
var _maxb=_bmaxe+10;
// Alter Selection Headings
cnl_setHide('_snh1','inline');
cnl_setHide('_snh2','inline');
// Alter Winning Number Fields
// alert('cnl_setPrompts: _maxe='+_maxe+' _bmaxe='+_bmaxe+' _maxb='+_maxb); //####
for(x=1;x<=10;x++) {
eid='_sn'+x;
action='none';
if (x <= _maxe) { action='inline'; }
cnl_setHide(eid, action);
}
// Now Alter bonus Number fields
for(x=11;x<=12;x++) {
eid='_sn'+x;
action='none';
if (x <= _maxb) { action='inline'; }
cnl_setHide(eid, action);
}
document.getElementById('_maxe').innerHTML=_maxe;
document.getElementById('_bmaxe').innerHTML=_bmaxe;
document.getID._sdate.focus();
}
//***************************************************************************
// function to obtain selected game parameters and hide/unhide input blocks
function cnl_setHide(eid, action) {
document.getElementById(eid).style.display=action; <<====<<<
}
The line identified by the arrow pointer is failing with the error that the ein is NULL. I've used alerts as well as firebug and web developer to monitor the content of that field and it all seems just fine.
Does anyone have any idea why I would receive that error (other than the obvious "its NULL"?
Again, I don't know why but this occurred only AFTER updating the server components.
Anything else I should be checking for? Oh, and whenever I try to alert most fields I only see Nan which didn't happen before. I know that Nan indicates Not a Number and ein is a string, NOT a number.
Thanks all for any ideas.
Apache 2.2.22, php 5.4.9-4
and I know that the js runs in the client side browser but as it is a development question I am posting here.
Here's a little snippet of code that runs on an onChange event:
// function to obtain selected game parameters and hide/unhide input blocks
function cnl_setPrompts() {
var _maxe=Number(Ginfo['_maxe']);
var _bmaxe=Number(Ginfo['_bmaxe']);
var _maxb=_bmaxe+10;
// Alter Selection Headings
cnl_setHide('_snh1','inline');
cnl_setHide('_snh2','inline');
// Alter Winning Number Fields
// alert('cnl_setPrompts: _maxe='+_maxe+' _bmaxe='+_bmaxe+' _maxb='+_maxb); //####
for(x=1;x<=10;x++) {
eid='_sn'+x;
action='none';
if (x <= _maxe) { action='inline'; }
cnl_setHide(eid, action);
}
// Now Alter bonus Number fields
for(x=11;x<=12;x++) {
eid='_sn'+x;
action='none';
if (x <= _maxb) { action='inline'; }
cnl_setHide(eid, action);
}
document.getElementById('_maxe').innerHTML=_maxe;
document.getElementById('_bmaxe').innerHTML=_bmaxe;
document.getID._sdate.focus();
}
//***************************************************************************
// function to obtain selected game parameters and hide/unhide input blocks
function cnl_setHide(eid, action) {
document.getElementById(eid).style.display=action; <<====<<<
}
The line identified by the arrow pointer is failing with the error that the ein is NULL. I've used alerts as well as firebug and web developer to monitor the content of that field and it all seems just fine.
Does anyone have any idea why I would receive that error (other than the obvious "its NULL"?
Again, I don't know why but this occurred only AFTER updating the server components.
Anything else I should be checking for? Oh, and whenever I try to alert most fields I only see Nan which didn't happen before. I know that Nan indicates Not a Number and ein is a string, NOT a number.
Thanks all for any ideas.