#Display name below drop down list based on selection from dropdown list

1 messages · Page 1 of 1 (latest)

sturdy comet
#

I need to use Java to display the name of the manager of any given department when I select said department from a drop down list.

The database is poorly designed and can't be changed, so the departments table only has the name of the department and the managerID, which is a foreign key to empID in the employees table, which also doesn't have names it, but does have the username of employees, which is a foreign key in the people table, which DOES have the first and last name of the employees. My understanding is that I'll need a double inner join to get that data to match up properly. However, I'm unaware of how to get the java working properly. Any help would be appreciated.

tulip ravineBOT
#

<@&987246399047479336> please have a look, thanks.

tulip ravineBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If your code is long, or you have multiple files to share, consider posting it on sites like https://pastebin.com/ and share the link instead, that is easier to browse for helpers.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

sturdy comet
#

this is the current php page; currently fully functional. I can post pictures of the database as well if my explanation was subpar

tender copper
sturdy comet
#

I think I'm supposed to use java to get the name to appear under the drop down box when a department is selected

#

but that doesn't mean php can't be used; it just can't be done SOLELY with php

tender copper
#

wdym you think you're supposed to use java

#

what is this for

sturdy comet
#

college assignment

#

the goal of the assignment is to implement java into a previous assignment, so java needs to be used to accomplish this

tender copper
#

this doesnt make sense

#

you're redoing the whole thing in java? Did they specify a framework like spring? This is very vague

#

you cant mix java and php

sturdy comet
#

not redoing the whole thing; I already have, in php, a functioning drop down list of available departments, so the goal is just to use Java to read the selected department, and then dump the name of that department's manager

tender copper
#

that makes no sense

sturdy comet
#

I don't know how else to explain it

#

"Augment your process for creating a new employee so there is a select list to chose the department they work for (if you don't already have it). When different department values are selected print out the full name of the department manager below the select list"

tender copper
#

what does any of that have to do with java

sturdy comet
#

I didn't make the assignment brother

tender copper
#

Nowhere does that state java

sturdy comet
#

"The goal of assignment 6 is to add some javascript to our site to improve the usability:"

#

"3. Augment your process for creating a new employee so there is a select list to chose the department they work for (if you don't already have it). When different department values are selected print out the full name of the department manager below the select list"

tender copper
#

Java and JavaSCRIPT are completely different

#

that is doable

sturdy comet
#

oh my bad, I've never used either until now, didn't know they were two separate things

tender copper
#

Are you supposed to use jquery?

sturdy comet
#

I've never heard of it before so probably not haha

tender copper
#

im no js (javascript) expert but i feel like you'd want to have jquery listen for a change on the form and GET request the php server for the name

#

with ajax call from jquery: