O
OccasionalFlyer
I maintain JavaScript for my university that is used in an online
admissions application. It's complicated by the software environment
but the basic structure of the JavaScript, its main job is this:
When the apllication's first page comes up, a drop-down is populated
with all the current programs (like a major sort of)
A student chooses a program
The JavaScript populates a list of plans (like concentrations within a
major)
The user chooses a plan from the drop-down
The JavaScript populates drop-downs for location and for term (like
semester).
Currently, there is a hierarchical relation between these:
For every program, there are n plans (values in an option block)
For every plan, there is an option block for location
For some plans, there is an option block for an emphasis (more
specific than a concentration)
For every plan, there is an option block for terms
I have a request to make it possible to link locations and terms,
which are currently independent. This would mean that
if I choose a program, I get a list of plans
If I choose a plan, I get a list of locations
If I choose a location, I get a list of terms
Right now term and location are not connected in any way, except that
they belong to the same plan.
So I have to restructure the JavaScript but the complexity this
introduces sounds like adding another 10,000 lines to the 3,000 lines
that already exist. Any suggestions on the least complex way to do
this? Right now, each option block of course uses a value, like the
plan. I'm thinking that what I might need to somehow create a
"composite" value of plan + location in order to choose which term
block to use, for example. However, I have no idea how to do that.
I'm looking for ideas so that this isn't he only thing I do for the
next six months. Thanks.
Ken
admissions application. It's complicated by the software environment
but the basic structure of the JavaScript, its main job is this:
When the apllication's first page comes up, a drop-down is populated
with all the current programs (like a major sort of)
A student chooses a program
The JavaScript populates a list of plans (like concentrations within a
major)
The user chooses a plan from the drop-down
The JavaScript populates drop-downs for location and for term (like
semester).
Currently, there is a hierarchical relation between these:
For every program, there are n plans (values in an option block)
For every plan, there is an option block for location
For some plans, there is an option block for an emphasis (more
specific than a concentration)
For every plan, there is an option block for terms
I have a request to make it possible to link locations and terms,
which are currently independent. This would mean that
if I choose a program, I get a list of plans
If I choose a plan, I get a list of locations
If I choose a location, I get a list of terms
Right now term and location are not connected in any way, except that
they belong to the same plan.
So I have to restructure the JavaScript but the complexity this
introduces sounds like adding another 10,000 lines to the 3,000 lines
that already exist. Any suggestions on the least complex way to do
this? Right now, each option block of course uses a value, like the
plan. I'm thinking that what I might need to somehow create a
"composite" value of plan + location in order to choose which term
block to use, for example. However, I have no idea how to do that.
I'm looking for ideas so that this isn't he only thing I do for the
next six months. Thanks.
Ken