Drop Down List in MOD Pl/sql [message #200519] |
Tue, 31 October 2006 04:14 |
akkurup
Messages: 3 Registered: October 2006
|
Junior Member |
|
|
Hi Mod Pl/sql Folks,
Please help this is Urgent,
My Client is looking out for a Dependent Drop down list.
Like . Location Drop Down list
Deptartment Drop Down list-- Depends on Location.
Emp Drop Down List --------Depends on Department.
I will appreciate if any one help me on this.
|
|
|
|
Re: Drop Down List in MOD Pl/sql [message #200528 is a reply to message #200519] |
Tue, 31 October 2006 04:44 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
The way we do this is to add an onChange trigger into the Select item in HTML. The onChange trigger does a "submit();" which lets the server regenerate the page and build the new drop down lists based on the current selections.
|
|
|
|
Re: Drop Down List in MOD Pl/sql [message #200569 is a reply to message #200562] |
Tue, 31 October 2006 06:47 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
No. That would be a lot of work for me, and you wouldn't learn nearly as much from that as you will by working the details out for yourself.
I'll give you a set of pointers, and help you with any specific problems that you have.
1) Create a function to generate an HTML Select tag for Location (note the javascript onChange trigger)
<select name="P_LOCATION" size="1" onChange="submit();">
<option value="1"</option>Location 1
<option value="2"</option>Location 2
2) Create a function that will take the value of the parameter P_Location and build an HTML Select tag for the Departments for the selected location. Don't forget the onChange trigger.
3) Ditto for Emp for the selected Department.
Now put calls to these 3 functions in the PSP. When you select a value from the first list, it will make the web page do a Submit, and return to the server. The server will read the parameter selected in the dropdown list and the function written in 2) will use this parameter to build the correct dropdown list for list 2.
|
|
|
|
|
|