load courses in rules/display using javascript