Question: I have the following div tag: (jobform)

```
<!--jobform-->
<div class="jobform" onclick="SetChecks();">
<div class="jobform_l" ><?php _e('Category');?> : <span class="required">*</span>      </div>

<div class="jobform_r" > 

<?php require_once (TEMPLATEPATH . '/jobs_category.php');?>
</div>
<div class="aglabel">Job Poster :</div>
</div><!--jobform-->

```

I am generating an array of checkboxes (Categories), since I don't have the checkbox tags I will need to capture the event of `onclick` on this div and check/uncheck certain checkboxes. Like when one is checked I want the other one to be unchecked. So I have implemented the following Javascript to do that:

```
<script type="text/javascript"> 
function SetChecks() { 
Alert("test");
if(document.getElementById('41').Checked)
{
document.getElementById('39').Checked = false;
}
else if(document.getElementById('39').Checked)
{
document.getElementById('41').Checked = false;
}
</script>

```

But for some reason it is not being triggered, I event tried putting an `Alert()` just to make sure it is being clicked or no.

Answer: 
Not sure if you would be willing to go in this direction, but I recently wrote a webservice in ASP.NET MVC 3. You can bind the passed JSON directly to object models without having to write any extra code. You can also configure the URLs to match the REST standard. If you are working with something like SQL Server this approach would probably be pretty straightforward.
I'd recommend Rails or Sinatra (which you could run on top of Java with JRuby). Both can take advantage of ActiveRecord and other Ruby ORM and DB connection libraries; you should be able to make these libraries talk to your legacy databases without too much trouble.