Home » SQL & PL/SQL » SQL & PL/SQL » Drop Down List in MOD Pl/sql
Drop Down List in MOD Pl/sql [message #200519] Tue, 31 October 2006 04:14 Go to next message
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 #200520 is a reply to message #200519] Tue, 31 October 2006 04:18 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Quote:
Reported By: akkurup
On: Tue, 31 October 2006 11:15
In: SQL & PL/SQL PL/SQL Experts Drop Down List in MOD Pl/sql
Reason Urgent Help Required
Don't report messages to get attention! Reports are seen by the moderators/administrators only.

MHE
Re: Drop Down List in MOD Pl/sql [message #200528 is a reply to message #200519] Tue, 31 October 2006 04:44 Go to previous messageGo to next message
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 #200562 is a reply to message #200528] Tue, 31 October 2006 06:34 Go to previous messageGo to next message
akkurup
Messages: 3
Registered: October 2006
Junior Member
Hi,
Can Please provide me with an example like with location,Depatrment and Emp.



Re: Drop Down List in MOD Pl/sql [message #200569 is a reply to message #200562] Tue, 31 October 2006 06:47 Go to previous messageGo to next message
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.
Re: Drop Down List in MOD Pl/sql [message #200578 is a reply to message #200569] Tue, 31 October 2006 07:05 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Sounds like a typical ajax problem!
Re: Drop Down List in MOD Pl/sql [message #200608 is a reply to message #200578] Tue, 31 October 2006 08:22 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Ahh, I dream of using Ajax, instead of doing it all by hand....
Re: Drop Down List in MOD Pl/sql [message #200646 is a reply to message #200608] Tue, 31 October 2006 12:31 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:234614318676
Previous Topic: Need SQL Help Please
Next Topic: about trigger
Goto Forum:
  


Current Time: Sat Dec 10 05:01:49 CST 2016

Total time taken to generate the page: 0.15982 seconds