andrew867 / timeclock

An updated version of PHP Timeclock
40 stars 69 forks source link

Edit System Settings is not working. #14

Closed BrentD27 closed 8 years ago

BrentD27 commented 9 years ago

I have installed the master repository. When I click "Edit System Settings" I get a blank page. The Debugger shows an error in the function office_names(). The debugger indicates a problem in the following code:

function office_names() { var select = document.form.office_name; select.options[0] = new Option("all"); select.options[0].value = 'all';

    select.options[1] = new Option("Main");
    select.options[1].value = "Main";
}

It highlights the line "select.options[0] = new Option("all"); and says "Uncaught TypeError: Cannot read property 'options' of undefined".

I've managed to debug all the other minor issues, but I can't seem to figure this one out.

andrew867 commented 8 years ago

You can try changing the line:

var select = document.form.office_name;

into:

var select = document.forms["office_name"];

andrew867 commented 8 years ago

I've just checked my local install and I do not have this issue using Google Chrome or Firefox. It could be an outdated browser issue (IE 6?). I'll close this for now but if you are still having an issue feel free to open it again.