Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: OAS 3 Web Toolkit: How to create dependent LOVs?

Re: OAS 3 Web Toolkit: How to create dependent LOVs?

From: Donavon Kuhn <NOSPAM.donavon_at_iname.com>
Date: 25 Mar 1999 23:12:06 -0600
Message-ID: <mGEK2.12263$gn1.44906@newscene.newscene.com>


John,

Well, you have several options to create dependent listboxes (LOV's in Oracle-speak). All require some clever client-side JavaScript.

  1. Use a Microsoft technology called Remote Scripting. Not practical for you as the server side requires IIS. You could re-write it to use OAS, but this is no small task. Even if you don't use RS, you should check out my "Dependent Listbox" example at http://n2.neoshop.com/rs.
  2. In the 1st listbox's OnChange event, post the selection of the 1st listbox back to the server. Then the server would load up the 2nd listbox with items based on the selection made in the 1st. This technique requires a server hit and page refresh each time the 1st listbox changes (not an elegant solution).
  3. Use a similar OnChange event (as in solution 2), but reload the 2nd listbox in the client from data loaded into a JavaScript array. This technique required a lot more JavaScript but is probably your best choice. There is only one server page hit no matter how many times you change the selection in the 1st listbox. This will also be the quickest for the user.

Good luck.
Donavon Kuhn
http://donavon.com

John Haskins <76054.334_at_compuserve.com> wrote in message news:7de966$dgs$1_at_news-2.news.gte.net...
> Howdy, Web experts. Show your skill by helping me create a form with LOVs
> whose contents have a master-detail relationship!
>
> I am using OAS 3 and need to create a Web form that includes a pair of
LOVs,
> which I have created using the htp.formSelectOpen command. Now comes the
> tricky part: I want to filter the contents of the second LOV based on the
> choice the user makes in the first one. I've scoured the Oracle docs, the
> Oracle Press OAS Web Toolkit Reference, and even a manual from Oracle's
ILT
> class, and haven't found an answer to this. I would greatly appreciate
any
> assistance on making this work.
>
> Here is the code I have, which produces a single LOV based on a table:
> _______________
> CREATE OR REPLACE procedure PROJECT_PROC AS
> cursor CURSOR_PROJECT is
> select distinct PROJECT_ID
> from PROJECT_TASK
> order by PROJECT_ID;
> BEGIN
> htp.htmlopen;
> htp.headopen;
> htp.title('Project / Task Selection');
> htp.headclose;
> htp.bodyopen;
> htp.header(1, 'Project / Task Selection');
> htp.formOpen('performSearch');
> htp.formSelectOpen('PROJECT_ID', 'Please select the
Project:
> ');
> for I in CURSOR_PROJECT loop
> htp.formSelectOption(I.PROJECT_ID);
> end loop;
> htp.formSelectClose;
> htp.formClose;
> htp.bodyclose;
> htp.htmlclose;
> END;
> /
> _______________
>
> Thanks very much.
>
>
>
>
Received on Thu Mar 25 1999 - 23:12:06 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US