This content has been marked as final. Show 7 replies
Hey Emmim, not sure exactly what you are asking in your question. It seems like you are asking a question about how to use AJAX to query a database and return employee data for a selected department to your page. However, your topic title is "Not Ajax", so I'm a little confused. It seems like there are 2 possible solutions to your question:
2) Non-Ajax Solution - submit the form when a department is selected, and perform the look up and page formatted in CF on the form's action page.
In your 2nd solution, should i use a div with it...
In the second solution I listed, you could use whatever formatting you wanted to display the employee information (a table, grid, spreadsheet):
1) User selects department from drop down in form
2) Form is submitted to action Page via regular HTTP post
3) on action Page: query DB, return employees, format employee info in HTML
opps.my bad..I want to see the employee info on the same page...after selecting a dept..
with js you can pre-buid a 2d array of employees for each department,
and then change the content of your div based on which department was
selected in the listbox.
ajax will do nicely, too.
You can set your first drop down as a jump menu and have it do a post back
to the same page and page and use a IsDefined to have the second dropdown
pull the information. I do that on a couple of my sites since I can't seem
to get the Ajax working. Its ugly but it works perfect for the time being.
Sounds good guys...thanks..