Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

javascript call to controller function

edited November 2011 in Modules
What is wrong with this code?
The first select combo change event works fine but does not work in other event.
var StudentsAttendanceController = {

init : function(initObj){
add_edit : function(){;

alert('not done');



  • edited 2:31PM
    Tough to say. But if one is working and the other isn't, I'd double check the source to make sure the id used in the Javascript matches what is in the HTML.
  • edited November 2011
    The id matches on html and js:
    the html output is

    <td class="value">
    <select name="students_attendance[class_id]" id="students_attendance_class_id">


    <td class="label"><label for="section_id" id="label_section_id">Section
    <td class="value"><select id="students_attendance_section_id" name="students_attendance[section_id]">
  • edited 2:31PM
    Not sure if this would help, but do you need an ending </select>
Sign In or Register to comment.