I am trying to get the beckend working on my site.... I would like to have a form on my page to allow the user to change the data that is displayed on the front end. First display the data in a disabled field, then when the user click on it the field will become enabled. So I have in my chunk;
<script language="javascript">
function enableFieldf()
{
document.litters.apupsf.disabled=false;
}
function enableFields()
{
document.litters.apups.disabled=false;
}
</script>
<form name="litters" id="litters" action="[~[*id*]~]" method="post">
<table width="80%" border="1">
<thead>
<th>Sire Callname</th>
<th>Dam Callname</th>
<th>Show Record</th>
<th>Males Available</th>
<th>Females Avaiable</th>
</thead>
<tbody>
<tr>
<td width="20%"><div align="center">[+Sire_callname+]</div></td>
<td width="20%"><div align="center">[+Dam_callname+]</div></td>
<td width="20%"><div align="center"><input type="checkbox" checked="[+show+]" name="[+id+]" /></div></td>
<td width="10%"><div align="center"><input type="text" size="5" value="[+Apups+]" onclick="javascript:enableFields" disabled="disabled" name="apups"/></div></td>
<td width="10%"><div align="center"><input type="text" size="5" value="[+Apupsf+]" onclick="javascript:enableFieldf" disabled="disabled" name="apupsf"/></div></td>
</tr>
</tbody>
<tfoot>
<tr><td colspan="5"><div align="center"><input type="submit" name="Submit" value="Change"></div></td></tr>
</tfoot>
</table>
</form>
But it doesn’t work...

Story of my my life.... lol Can some one give me some help?
The important thing is not to stop questioning. Curiosity has its own reason for existing. One cannot help but be in awe when he contemplates the mysteries of eternity, of life, of the marvelous structure of reality. It is enough if one tries merely to comprehend a little of this mystery every day. Never lose a holy curiosity.
-Albert Einstein (1879 - 1955)
Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
I figured it out.... I need to give each element its own id, otherwise the script doesn’t know which ’apups’ to enable I will post my script as soon as I get the bugs worked out.
The important thing is not to stop questioning. Curiosity has its own reason for existing. One cannot help but be in awe when he contemplates the mysteries of eternity, of life, of the marvelous structure of reality. It is enough if one tries merely to comprehend a little of this mystery every day. Never lose a holy curiosity.
-Albert Einstein (1879 - 1955)
Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
I needed to add a check box to the table:
<script language="javascript">
function removeElements(id) {
var elmt = document.getElementById(id);
elmt.disabled?elmt.disabled=false:elmt.disabled=true;
}
</script>
<tr>
<td width="20%"><div align="center">[+Sire_callname+]</div></td>
<td width="20%"><div align="center">[+Dam_callname+]</div></td>
<td width="10%"><div align="center"><input type="checkbox" checked="[+show+]" name="[+id+]" /></div></td>
<td width="10%"><div align="center"><input type="text" size="5" value="[+Apups+]" disabled name="apups[+id+]" id="apups[+id+]"/></div></td>
<td width="10%"><div align="center"><input type="text" size="5" value="[+Apupsf+]" disabled name="apupsf[+id+]" id="apupsf[+id+]"/></div></td>
<td width="10%"><input type="checkbox" onClick="javascript:removeElements('apups[+id+]');removeElements('apupsf[+id+]');"/></td>
</tr>
this seemed to work.... Hope this helps anyone who has the same issue.
The important thing is not to stop questioning. Curiosity has its own reason for existing. One cannot help but be in awe when he contemplates the mysteries of eternity, of life, of the marvelous structure of reality. It is enough if one tries merely to comprehend a little of this mystery every day. Never lose a holy curiosity.
-Albert Einstein (1879 - 1955)
Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635