- if (document.getElementById('<% $name %>').selectedIndex ==
- (document.getElementById('<% $name %>').length - 1)) {
- document.getElementById('new<% $name %>').disabled = false;
- document.getElementById('new<% $name %>').style.display = 'inline';
- document.getElementById('new<% $name %>Label').style.display = 'inline';
- document.getElementById('new<% $name %>T').disabled = false;
- document.getElementById('new<% $name %>T').style.display = 'inline';
- document.getElementById('new<% $name %>TLabel').style.display = 'inline';
- }else{
- document.getElementById('new<% $name %>').disabled = true;
- document.getElementById('new<% $name %>').style.display = 'none';
- document.getElementById('new<% $name %>Label').style.display = 'none';
- document.getElementById('new<% $name %>T').disabled = true;
- document.getElementById('new<% $name %>T').style.display = 'none';
- document.getElementById('new<% $name %>TLabel').style.display = 'none';
+ if (document.getElementById('<% $id %>').selectedIndex ==
+ (document.getElementById('<% $id %>').length - 1)) {
+ document.getElementById('new<% $id %>').disabled = false;
+ document.getElementById('new<% $id %>').style.display = 'inline';
+ document.getElementById('new<% $id %>Label').style.display = 'inline';
+ document.getElementById('new<% $id %>T').disabled = false;
+ document.getElementById('new<% $id %>T').style.display = 'inline';
+ document.getElementById('new<% $id %>TLabel').style.display = 'inline';
+ } else {
+ document.getElementById('new<% $id %>').disabled = true;
+ document.getElementById('new<% $id %>').style.display = 'none';
+ document.getElementById('new<% $id %>Label').style.display = 'none';
+ document.getElementById('new<% $id %>T').disabled = true;
+ document.getElementById('new<% $id %>T').style.display = 'none';
+ document.getElementById('new<% $id %>TLabel').style.display = 'none';