Newb AJAX - construction hyperlink from two selection lists
Hi people,Would anyone familiar with care of AJAX to help out me? I am very new to AJAX, and I'm trying to set up a page that generates a URL hyperlink based on two input chooses. By example, if the first select statement was 'IT' and the second 'APPL' the URL to be returned would be
http://Apex.Oracle.com/pls/OTN/f?p=28213:2:803955090371716:no:2:P2_SUPPORT_DEPT, P2_SUPPORT_TYPE:IT, APPL
The reason for this is because I want an easy way for employees to create links in their email signatures that correspond to their assistance and group service. In this way, when a customer clicks the link in the signature of the employee these two selection lists is already selected for customer when they submit comments on this employee.
We invite you to check what I have up here on apex.oracle.com:
WORKSPACE: ARES_APEX
USERNAME: ACE
PASSWORD: h3lpf4l
(MBDR - 28213)
My error console JavaScript told me that two of my functions are not defined, but I know that 'change_support_type()' works is a "show_url()" I think that I probably need a lot of help.
Thank you all for all the wonderful help that you have provided and will provide this forum. :)
-Anton
Published by: sleeper on August 28, 2008 12:07
Published by: sleeper on August 28, 2008 12:29
Hello
You had a few problems with your javascript code.
The one that you just had a plain error (wrong number of media which has been lifted) and the error.
You select AJAX were working properly, but then to get the other content, you tried pulling XML reuse and analysis and the other which is excessive. He needed just to get the snippet of text and push it into the page.
Here is your http://apex.oracle.com/pls/otn/f?p=28213:4 working page
and here is your new code
function change_support_type(pThis,pSelect){
var l_Return = null;
var l_Select = $x(pSelect);
var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=change_support_type_page_4',4);
get.add('P4_SUPPORT_DEPT',pThis.value);
gReturn = get.get('XML');
if(gReturn && l_Select){
var l_Count = gReturn.getElementsByTagName("option").length;
l_Select.length = 0;
for(var i=0;i;appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'), l_Opt_Xml.firstChild.nodeValue)}}get = null;}
function appendToSelect(pSelect, pValue, pContent) {var l_Opt = document.createElement("option");l_Opt.value = pValue;if(document.all){/* why is ie different ask bill */pSelect.options.add(l_Opt);l_Opt.innerText = pContent;}else{l_Opt.appendChild(document.createTextNode(pContent));pSelect.appendChild(l_Opt);}
}
function show_url(pThis, pThat){ var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=show_url',4);get.add('P4_SUPPORT_DEPT',$v('P4_SUPPORT_DEPT')); get.add('P4_SUPPORT_TYPE',$v('P4_SUPPORT_TYPE')); gReturn = get.get(); $x('drop_content').innerHTML = gReturn;get = null;}
You can read more about our Ajax framework here [http://apex.oracle.com/pls/otn/f?p=11933:63]
Also when developing AJAX you should use Firefox with the Firebug addon , even if your building for an IE only environment, it makes debugging AJAX and javascript issues much easier.
Edited by: Carl Backstrom on Aug 28, 2008 12:56 PM
Tags: Database
Similar Questions
-
Using AJAX code for the conditional selection list.
Hello
I use AJAX code for the first time, I have no knowledge in java, I got the code from this forum and try to manipulate my requirement.
My requirement is that I have two selection lists, host_name) 1 and 2) database_name.
As soon as I pick/choose the value of host_name select list, I need to fill in only the databases on this particular host. I don't want to send the page for this action.
Here is the code, thank you if anyone can help.
On request the code application process:
-----------------------------------------------------
declare
number of l_counter;
l_o_name varchar2 (2000);
Start
owa_util.mime_header ("text/xml", FALSE ");
HTP.p ('Cache-Control: non-cache');
HTP.p ('Pragma: non-cache');
owa_util.http_header_close;
HTP. PRN ("< select > '");
for rec in (select "ORA_DATABASES_VW". "' Database_name ' as 'database_name ',.
'ORA_DATABASES_VW '. "" DB_ID "as"DB_ID ".
of 'ORA_DATABASES_VW '.
where 'ORA_DATABASES_VW '. ("' HOST_NAME ' =: TEMP_ITEM)
loop
HTP. PRN ("< option value ="' | rec.db_id |) '">' || Rec.database_name | ("< / option >");
end loop;
HTP. PRN ("</select > '");
end;
Header HTML on this page:
=================
< script language = "JavaScript1.1" type = "text/javascript" >
function get_List_XML (source_item, target_item) {}
var v_Target = html_GetElement (target_item);
var v_Source = html_GetElement (source_item);
var ajaxResult = new htmldb_Get (null, & APP_ID, 'APPLICATION_PROCESS = POPULATE_LIST_XML', 0);
ajaxResult.add ('TEMP_ITEM', source_item.value);
var v_result_xml = ajaxResult.get ('XML');
If (v_result_xml & & v_Target)
{
var options_Contents = v_result_xml.getElementsByTagName ("option");
v_Count = options_Contents.length;
v_Target.length = 0;
for (var i = 0; i < v_Count; i ++)
{
var v_opt_xml = v_result_xml.getElementsByTagName ("option");
appendToSelect (v_Target, v_opt_xml.getAttribute ('value'), v_opt_xml.firstChild.nodeValue)
}
}
}
function appendToSelect (target_item, option_val, option_content) {}
var v_Opt = document.createElement ("option");
v_Opt.option_value = option_val;
{if (document. All)}
target_item.options.Add (v_Opt);
v_Opt.innerText = option_content;
} else {}
v_Opt.appendChild (document.createTextNode (option_content));
target_item. AppendChild (v_Opt);
}
}
< /script >
Attribute of the form in the host_name column element. P935_INSTANCE_DB_NAME is my page for database_name.
OnChange = "get_List_XML (this,"P935_INSTANCE_DB_NAME").Feel free to mark the answers useful or correct ;)
-
Dynamic action in two selection list
Hi all
I created two select lists.one is parent of other child.
I can get the child list correctly from the article values parent lov cascading
For example: the company name of parent element values: x, y, z, etc.
x with 3 customers say a, b, c
There is no customer for y
z with 2 customers say e
now, I want to hide the element of the child when the parent having no child.
Now when I select 'y' for the example above, I would like to hide the child element.
How can I do?Hello
You can do the following:
1. create a hidden page element, say PX_HIDE_SHOW_FLG
2. create a dynamic Action of type 'Set value' on the element parent to update PX_HIDE_SHOW_FLG. You can choose the "value Type" as "body of the PL/SQL function. The code in the function must return "Y" or "n" based on logic (count the number of children under the selected parent). You can trigger this DA on 'change' of the parent element.
3. now, create another DA on PX_HIDE_SHOW_FLG to hide and show the child LOV article based on its value. For example, if value (of the page hidden item) = 'Y', and then hide, another show.Thank you
Rohit -
Two Select lists with Submit single page branching to different page each?
Hi all
I have a page (No. 1) with two 'select list with Submit"(A and B). This page contains also two branches defined. I want to realize that the first list selection with present (A) would always use the first branching (at page n ° 2) and the select list a second with the submit (B) would use the second fork (at page no. 3).
How can I achieve this? Y at - it a tutorial describing lists of selection and the ramifications?
Thank you for your time.
DanielWhen the selection list submits the page, the value of "motion" is the name of the selection list item. So all you need to do is add a condition to each Directorate-General: Request = Expression 1 and enter the name of the element (top) in the field of 1 the condition Expression.
Scott
-
Message says:
C:\users\deaconmike\appdata\local\MicrosoftOutlook\Outlook.pst
Quit Outlook and all mail inabled applications, then use the repair tool Inbox (scanpst.exe) to diagnose and repair errors in the file. For more informaion about the Inbox Repair tool, see Help.
Hello
1. from which the program (Windows Media Player) selection list is missing?
2 have you checked in the Windows features?I suggest that you follow the steps mentioned below.
Step 1:
Check if Windows Media Player is disabled in Windows Features.
http://Windows.Microsoft.com/en-us/Windows-Vista/turn-Windows-features-on-or-off
Step 2:
I suggest that you run SFC scan on your machine to verify if this is related to missing or damaged system files.
As regarding problems with Outlook, I you should post the question in the forums of Outlook.
-
Editing cascading from the selection list - not refreshing during the loading?
Hi all
I have 2 lists of selection, the latter with an option cascading of LOV.
Now, this works very well when you select an option in the list 1, list 2 fills correctly.
My question is when I re - complete list 1 and list 2 from a single onload procedure 1 load properly, list 2 does not show the correct value (but it has not the right value is session).
This feature exist?
Please let me know if you need more information.
Concerning
SpamHello
You have the following items in the pl/sql code of DA:
begin select parent_id, child_id into :p1_parent, :p1_child from holder where parent_id = 1; end;
You have the following in the query LOV's P1_CHILD:
select col2 d, col1 r from child where col3 = :p1_parent
P1_parent = 1, the LOV query returns 2 rows - DUNDEE and GLASGOW. The list of selection, therefore, cannot set a value. I changed the order of the day of the P1_CHILD page for a multiple-selection list and it works fine now.
-
Javascript-based dynamic action and display the value of (!) from the selection list
Hello
I'm not a jQuery guru (yet).
Can someone show me how to turn on or off an ITEM on a form based on the value display of a selection list (usually I have dynamic lists, so I don't 'know' even internal values)
I created a simple demo in which you can (if you want to) show me how it works.
Workspace: 6POOLRULES
User: demo01
Password: demo
Application: 30851 (Drone)
The idea is to
* Disable/hide the "Id other Description" If the ' Id Type (display value!) is 'Passport' or 'license '.
* activate/display the Description of the 'other' Id if the ' Id Type (display value!) is "other".
I think that it should be dynamic action based on javascript/jQuery. But what would this jQuery selector should look like?
Published by: bveoracle on March 29, 2012 07:28
Published by: bveoracle on March 29, 2012 07:30Hello
OK, I changed the dynamic action to use Jquery and get text from the value. The only thing I changed is in the section WHEN.
Enjoy.
-
Slight problem of AJAX selection list, I hope...
I probably looked at all the examples that uses AJAX to fill selection lists that are out there and eventually got a job almost completely.
In my application, I use a form on page 23 to create a folder and then also use a form on page 22 to update a record. Two of these pages, I have 2 selection lists that use AJAX to complete each other. On my page of form creation, these two select lists display properly and correctly submit a report page.
Now, when I click on the document I just create the homepage, I get redirected to the update (page 22) page where I just submit all items are displayed correctly except the second selection list. The second selection list displays the correct list of the elements in the selection list, not the one I had just chosen. What is shown is the first option in the selection list, no matter what I had selected when I created the folder. Always the first option display anything in my code?
Thank you
Deanna
For example:
My current output:
P.23 (creation of registration)
Parameters:
: P23_CASE_NUMBER - 9999999999
: P23_CONT_FACTOR_CATEG - driver distracted by
: P23_CAUSES - other electronic devices
PG.22 (update record)
Parameters:
: P22_CASE_NUMBER - 9999999999
: P22_CONT_FACTOR_CATEG - driver distracted by
: P22_CAUSES-Mobile (cell) phone (WRONG)(first option in the list)
--------------------------------------------------------------------------------------------------------------------------------------------------
The output that I would see:
P.23 (creation of registration)
Parameters:
: P23_CASE_NUMBER - 9999999999
: P23_CONT_FACTOR_CATEG - driver distracted by
: P23_CAUSES - other electronic devices
PG.22 (update record)
Parameters:
: P22_CASE_NUMBER - 9999999999
: P22_CONT_FACTOR_CATEG - driver distracted by
: P22_CAUSES-other (CORRECT) Electronic Devices
Current code page 22 (Update Page):This is from the Header HTML --------------------------------------------------------- <script language="JavaScript1.1" type="text/javascript"> function get_TASK_SELECT_XML(pThis,pSelect){ var l_Return = null; var l_Select = $x(pSelect); var get = new htmldb_Get(null,$x('pFlowId').value, 'APPLICATION_PROCESS=TaskXML',0); get.add('WORK',pThis.value); gReturn = get.get(); gReturn = get.get('XML'); if(gReturn && l_Select){ var l_Count = gReturn.getElementsByTagName("option").length; l_Select.length = 0; for(var i=0;i<l_Count;i++){ var l_Opt_Xml = gReturn.getElementsByTagName("option");
appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
l_Opt_Xml.firstChild.nodeValue)
}
}
get = null;
}
function appendToSelect(pSelect, pValue, pContent) {
var l_Opt = document.createElement("option");
l_Opt.value = pValue;
if(document.all){
pSelect.options.add(l_Opt);
l_Opt.innerText = pContent;
}else{
l_Opt.appendChild(document.createTextNode(pContent));
pSelect.appendChild(l_Opt);
}
}
</script>
This is the application process - TaskXML
--------------------------------------------------------
begin
owa_util.mime_header('text/xml', FALSE );
htp.p('Cache-Control: no-cache');
htp.p('Pragma: no-cache');
owa_util.http_header_close;
htp.prn('<select>');
htp.prn('<option value="' || -1 || '">' || ' - Select-' || '</option>');
for rec in (select cause , cause
from cause where categ = :WORK)
loop
htp.prn('<option value="' || rec.cause_number || '">' || rec.cause || '</option>');
end loop;
htp.prn('</select>');
end;
Hello
There are a number of issues here:
1. remember that creation and editing features are on TWO different pages - when you refer to "the page is not save...". ' is in fact another page
2. in the CHART table, you have an ID column AND a column RECNUM. You use the RECNUM column in the report link. In the CHART table, there are plenty of duplicates in the column RECNUM, which made it impossible for me to test - whenever I've created a new record that he got the same RECNUM value as an existing record, and I couldn't change then my new record as the process of "search...". ' incorrect 'more than one folder. You must use the ID column in the link, because it is unique
3. on the selection of CAUSE list, you had a few items in quotes - I have no idea why. It was actually a good deal to do for your original problem. During the construction of the selection list, the value of the CASE is used as the VALUE attribute on the OPTION tag by enclosing it in quotes. What were you end up with is: < OPTION VALUE = '"sometext" ' > 'etc' < / OPTION >. The VALUE is, therefore, ""-an empty string. I removed the quotes from the data
4. more importantly, as the CAUSE table made a unique ID column, this should be used as a return value for the list and therefore, the value stored on the CARD table. If you do this, you use the quotation marks if they are in some casesAndy
-
AJAX casacading select list (example D.Kubicek)
Hello!
I don't know guys how U managed to do work... This I my just try to do (reproduce the example on my env) and always without success... I have only two select list (not 3 as in the example)
P13_DEPTNO
SELECT d, r deptno dname
OF THE Department
OnChange = "get_select_list_xml1 (This, 'P13_MGR')"; "
P13_MGR
D SELECT ename, empno r
FROM (SELECT ename, empno, deptno
FROM emp)
WHERE deptno =: p13_deptno
Application process
BEGIN
OWA_UTIL.mime_header ("text/xml", FALSE);
HTP.p ('Cache-Control: non-cache');
HTP.p ('Pragma: non-cache');
OWA_UTIL.http_header_close;
HTP.prn ("< select >");
HTP.prn ("< option value ="' | 1 |) "" ' > ' | ' - all managers - ""
|| "< / option >".
);
FOR c IN (d SELECT ename, empno r
FROM (SELECT ename, empno, deptno
FROM emp)
WHERE deptno =: cascading_selectlist_item_1)
LOOP
HTP.prn ("< option value ="' | c.empno |) '">' || c.Ename | ("< / option >");
END LOOP;
HTP.prn ("< / select >");
END
CASCADING_SELECTLIST_ITEM_1 exists
JS:
< script >
function get_select_list_xml1 (pThis, pSelect) {}
var l_Return = null;
var l_Select = html_GetElement (pSelect);
get var = new htmldb_Get (null, html_GetElement('pFlowId').value,
= CASCADING_SELECT_LIST1', 0);
Get.Add ('CASCADING_SELECTLIST_ITEM_1', pThis.value);
gReturn = get.get ('XML');
If (gReturn & & l_Select) {}
var l_Count = gReturn.getElementsByTagName("option").length;
l_Select.length = 0;
for (var i = 0; i < l_Count; i ++) {}
var l_Opt_Xml = gReturn.getElementsByTagName ("option");
appendToSelect (l_Select, l_Opt_Xml.getAttribute ('value'),
l_Opt_Xml.FirstChild.nodeValue)
}
}
get = null;
}
function get_select_list_xml2 (pThis, pSelect) {}
var l_Return = null;
var l_Select = html_GetElement (pSelect);
get var = new htmldb_Get (null, html_GetElement('pFlowId').value,
= CASCADING_SELECT_LIST2', 0);
Get.Add ('CASCADING_SELECTLIST_ITEM_2', pThis.value);
gReturn = get.get ('XML');
Alert (gReturn);
If (gReturn & & l_Select) {}
var l_Count = gReturn.getElementsByTagName("option").length;
l_Select.length = 0;
for (var i = 0; i < l_Count; i ++) {}
var l_Opt_Xml = gReturn.getElementsByTagName ("option") [i];
appendToSelect (l_Select, l_Opt_Xml.getAttribute ('value'),
l_Opt_Xml.FirstChild.nodeValue)
}
}
get = null;
}
function appendToSelect (pSelect, pValue, pContent) {}
var l_Opt = document.createElement ("option");
l_Opt.value = pValue;
{if (document. All)}
pSelect.options.add (l_Opt);
l_Opt.innerText = pContent;
} else {}
l_Opt.appendChild (document.createTextNode (pContent));
pSelect.appendChild (l_Opt);
}
}
< /script >
So what is the problem? After selecting anything in the first SL, nothing changes in the second ;/
EDIT: Now I get JS alert with null :) there is a progress: P
PsmakR
Edited by: PsmakR @ May 26, 2009 10:15Hello
It's actually the process code that is incorrect. It should be:
BEGIN OWA_UTIL.mime_header('text/xml', FALSE); HTP.p('Cache-Control: no-cache'); HTP.p('Pragma: no-cache'); OWA_UTIL.http_header_close; HTP.prn(''); END;
The original code was "d SELECT ename, empno FROM EMP r... ». Therefore, the available fields in the loop are 'd' and 'r' not 'ename' and 'empno '. I have changed the above to delete 'd' and 'r '.
Andy
-
Hello
I searched for the answer for a while now, but could not find a solution to my problem. It's a rather trivial issue, but after dealing with more urgent problems, I stuck with it and I can't move forward I use Apex 4.2.1
OK, lets start with a description.
I have two selection lists. After making a choice in the first, I would like to than the second value to change. It is not cascade LOV case, however, at least I don't.
Let me give you an example. Suppose we have a table with name and default to the occupation.
Name By default occupancy John Doctor Mark Firefighter George Firefighter Tom Concierge End user first selects the name in the first list, then the occupation of another. It's perhaps not clearly in the example given, but the order of the questions.
What I want is to force a change in the second value in the list after a choice in the first. So after the name is chosen, the occupation should switch to the default.
The assignment is the most typical, but not the only one. So I want the end user to be able to change the occupation if necessary. Tom of sense is not to be janiotor, it can be whoever he wants this is why it is not cascade LOV problem.
I tried with dynamic action - definition of value and then refresh. It works when the second selection list is the text field. I can't find a way to make it work with another selection list.
Hope you can help.
Concerning
AEMs salvation,
What I wanted with display and return value, you usually have a list of selection like this query:
SELECT occupation d, occp_id r
OF professions
If your return value is an identifier. To use the text as return value is rather rare. Where my question, because obviously you must select the return value in your query, NOT the display value.
So let me explain what is a set value. It takes the value of the server by using your query and AJAX in the background, then uses Javascript to set the value of the item in the browser.
At this point your selection list still has the OLD value in the session. Then, you do a refresh and the element uses the old value, and it seems that nothing happens.
So solution:
-clear default values, you don't need those
-get rid of refresh it in your DA
Kind regards
Joni
-
tabular cascading selection lists
APEX - 4.1.0.00.32
Version of DB - 10 g
Web - OHS server architecture
Browser - IE8
Theme - 9
Hello
I have a tabular layout with two selection lists, I would like to select a value from the first list that will help determine what appears in the second list. The name of the column in the first select list is 'DL_DETAIL_PROJECT_ID', so I wish I could have a charly second selection list that looks like
Select d, r id desc
< table >
where < other id of the table > = DL_DETAIL_PROJECT_ID
but I don't know how to get the value of DL_DETAIL_PROJECT_ID?
Also the list of regular article values of the shows an option for cascading lists, but the form of tables, list of the values section is not, is it possible to have cascading lists in a record on a tabular presentation?
Thanks in advance for any help.Yes you can. See the links provided:
http://Apex.Oracle.com/pls/Apex/f?p=39514:1:
http://www.inside-Oracle-apex.com/generic-solution-for-cascading-select-listslovs/
http://dbswh.webhop.NET/dbswh/f?p=blog:read:0:article:2003800346210117 -
Select list based on another list select
Hello
I have two selection list Position Type and post Code. I' of love to drive position with the selected item category code. I created On-Demand process, Javascript aan and onchange appeal of the type of post.
Application process: POPULATE_SELECT
DECLARE
l_posn_type varchar2 (4000);
BEGIN
l_posn_type: = wwv_flow.g_x01;
OWA_UTIL.mime_header (' text/xml', FALSE);
HTP.p ('Cache-Control: non-cache');
HTP.p ('Pragma: non-cache');
OWA_UTIL.http_header_close;
HTP.prn ("< select > '");
FOR rec IN (select posn_cd from the apex_posn_mstr where posn_typ = l_posn_type)
LOOP
HTP.prn ("< option value ="' | rec.posn_cd |) ""(>' || ' < / option >'); "
END LOOP;
HTP.prn ("</select > '");
END;
< script type = "text/javascript" >
function get_AJAX_SELECT_XML (pThis, pSelect)
{
var l_Return = null;
var l_Select = $x (pSelect);
get var = new htmldb_Get (null, $v ('pFlowId'), 'APPLICATION_PROCESS is POPULATE_SELECT', 0);
get.addParam ('x 01', $v (pThis));
gReturn = get.get ('XML');
If (gReturn & & l_Select)
{
var l_Count = gReturn.getElementsByTagName("option").length;
Alert (l_Count);
l_Select.length = 0;
for (var i = 0; i < l_Count; i ++)
{
var l_Opt_Xml = gReturn.getElementsByTagName ("option");
/ * Function to add to select call does not work. How to debug it * /.
appendToSelect (l_Select, l_Opt_Xml.getAttribute ('value'), l_Opt_Xml.firstChild.nodeValue);
}
}
get = null;
}
function appendToSelect (pSelect, pValue, pContent)
{
var l_Opt = document.createElement ("option");
l_Opt.value = pValue;
If (document. All)
{
pSelect.options.add (l_Opt);
l_Opt.innerText = pContent;
}
on the other
{
l_Opt.appendChild (document.createTextNode (pContent));
pSelect.appendChild (l_Opt);
}
}
< /script >
Attribute of the HTML form element: P16_POSN_TYPE:
OnChange = "get_AJAX_SELECT_XML (This, 'P16_POSN_ID')" "
The call to appendToSelect (l_Select, l_Opt_Xml.getAttribute ('value'), l_Opt_Xml.firstChild.nodeValue) does not work. Any ideas? How to debug this? We can print out the gReturn to see what is returned?Have you tried to change the POPULATE_SELECT process, where the HTML is generated for the option list?
My knowledge of HTML isn't fantastic, but try replacing:
HTP.prn (')
with:
HTP.prn (')
-
How do the value in a selection list to a text field without submit?
Hi all
I have a Select list that looks like:
Select short_name | ' - ' || country d
SHORT_NAME r
of mo.eu_country
order by 1
Then I have a text field (persons with reduced mobility, saved state).
What I want to do: when a country is selected in the list-> set the value of text field with the short name of the country from the selection list (short_name r).
Anyone know how I can get this done? (should I use AJAX?)
Kind regards
Ana-MariaHere is alink to Scott Spendolini autopopulate generator:
http://HTMLDB.Oracle.com/pls/OTN/f?p=33867:2:1496599659878861:no:
I use it and it works fine.
-
Cascading - HELP selection lists
I still missed something in the samples I've seen on the internet at cascading selection lists
I just need a selection list to determine the choice of another selection list, use simple terms.
Thanks for your help. Please need as soon as possible.Hello
OK - first of all you must have an item hidden on page 2 that will receive the country code (I'll stick with my example, if that's ok)-say P2_COUNTRY_CODE.
Now create two selection lists - say P2_STATE_CODE and P2_CITY_CODE.
It helps if you check that the P2_STATE_CODE list is defined with a default value to ensure that the list can be filtered properly. Create a calculation, to run in the point of process "Before Header" and the conditional on P2_STATE_CODE is null (Type of Condition: the point in 1 Expression is NULL;) Expression 1: P2_STATE_CODE). The value of a "static allocation" of something that will not appear in the list (for example, ZZ for strings) or - 1 for numerical values. You can do this on the list of cities as well if you wish. The two lists must be defined to display null values and have something like - Select - like display null text.
Your list of States should be created as a Select list with Submit with a list of values based on a SQL statement:
SELECT STATE_NAME d, STATE_CODE r FROM STATES WHERE COUNTRY_CODE = :P2_COUNTRY_CODE
Your list of cities is a list of select normal with a list of values based on a SQL statement:
SELECT CITY_NAME d, CITY_CODE r FROM CITIES WHERE COUNTRY_CODE = :P2_COUNTRY_CODE AND (:P2_STATE_CODE = 'ZZ' OR STATE_CODE = :P2_STATE_CODE)
Now, when the user selects a country from page 1, the country code is spent in P2_COUNTRY_CODE before the loading of page 2. The default values for P2_STATE_CODE and P2_CITY_CODE are defined and the lists are generated - cities list will display all cities for the country selected as the list of States shows only the default value of ZZ and cela "corresponds to" all cities of the country. Then, when the user selects an item in the list of the States, the page is sent and the value of P2_STATE_CODE is updated in the session. As the list of cities is based on this value, when the page is reloaded, it will be updated to filter based on the P2_COUNTRY_CODE and P2_STATE_CODE values.
The only thing you need to ensure is that P2_STATE_CODE and P2_CITY_CODE are deleted from the cache when you have more page - you can do in the branch back to page 1.
Andy
-
Selection list cascading in the dialogue window
Hello
I'm developing in Apex 4.2.5.
I have an Apex with a classic report region, in which a link edit page opens a dialog window (in the same page apex) to edit the selected line. The same dialog window is used to create a new line. The dialog window contains a cascading pick list. Two selection lists are defined to display NULL values and correctly fill in mode 'create '. My problem is that mode "Modify" the list of the second selection is not good value. The second selection list contains it however the right subset of values according to the parent, select the list and therefore don't does not contain the correct value, but it is not selected.
I use a javascript function to fill in the fields in the dialog.
....
$s ("P3_EVENT_TYPE", arguments [1]);
$s ("P3_EVENT_SUBTYPE", [2] arguments);
....
Then the display of the dialog window
openDialog ('editEvent');
The population of P3_EVENT_SUBTYPE list seems to happen but sometime after that all the fields in the dialog were assigned and the dialogue window displays.
I see that I need to somehow update the list of selection in cascade, P3_EVENT_SUBTYPE, before assigning the value. My problem is how can I do this in the same javascript function?
Kind regards
Derek
Eventually answered my own question-
I created a hidden field in which to store the value of the event subtype.
Created a dynamic of Action, after refresh of affected P3_EVENT_SUBTYPE subtype value = hidden field event.
Maybe you are looking for
-
Firefox crashes when I load a page that uses the Franklin Gothic font.
Hello. Firefox (and Word 2008 besides) was crashing whenever it tries to load / use a front of the "Franklin Gothic" font family I have looked around solutions, but it is just advisable to remove the police; I'm trying to see how I can solve the prob
-
Windows email will not be printed and give this message "email error unexpected call to the method"
Windows email will not be printed and give this message "email error unexpected call to the method" is there a solution for this?
-
Hello Could you please let me know where I can find the following utility software to download for windows server r2 2012? I need to use it to make the Online Capacity Expansion for raid 6. Thank you André
-
Remove all references to IE8, IE9.
I use IE11 on Windows 7 Ultimate 64 bit. There are many references to registry to IE8 and IE9 in the HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main registry location. I want to remove these references REG_BINARY and REG_DWORD, but also t
-
Windows 8 App Photo automatically closes
Hello! My app photo used to work, but I went and rearranged my library on my external hard drive and add more 11 000 photos, now it closes right after that I have run the application. Any ideas? I read that Kaspersky has been a factor in the problem,