Dashboard Add User Page JavaScript Issues

Permalink
Hi All,

I am quite new to C5 and currently trying to help a small firm with their C5 instalation by sorting the mess made with C5 by another developer. I am trying to get some JavaScript files working for a client on the Add User page in Dashboard with very little success.

Basically, I have PHP scripts that runs in a form and is used to create a select element by creating an array which in turn displays a hidden select field with a different list dependent on the selection made in the first select element. My problem is that I just can't seem to get the javascript to behave properly.

There are 3 departments and whilst carry out the add new user function, they want to be able to select a department in the first select element which will then reveal another hidden select element with choices relevant to that particular department.

<form name="classic">
<select name="departments" size="4" onChange="updatedepartments(this.selectedIndex)" style="width: 150px">
<option selected>Select</option>
<option value="sales">Sales</option>
<option value="accounts">Accounts</option>
<option value="support">Support</option>
</select>
<select name="departments" size="4" style="width: 150px" onClick="alert(this.options[this.options.selectedIndex].value)">
</select>
</form>
<script type="text/javascript">
var departmentslist=document.classic.departments
var departmentslist=document.classic.departments
var departments=new Array()
departments[0]=""


I would love to know how to set it up properly in C5 if anyone can help please. I have searched everywhere but can't seem to find any docs on customizing the dashboard pages whilst keeping the look and feel the same.

Thank you in advance.
Jase

 

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.