Similar to cascading select list...please give me some suggestions..
Hi everyone,
I had worked on cascading select lists where if i select a value in PARENT SELECT LIST,depend on the value of PARENT SELECT LIST the CHILD SELECT LIST will populate...
i am trying to implement something similar..but i would like to have the CHILD as "CHECKBOX'S" instead of "SELECT LIST"
ex:
==
PARENT SELECT LIST (if i select a value depend on the value it should display "CHECKBOX's")
CHILD CHECK BOX's
Is it possible to do this with "AJAX" (I dont want to submit the page after i select a value in select list)
Please help me to solve this..
Thanks
phani
Hi phani,
have you tried using Javascript to do this.
Regards
Rana
Similar Messages
-
Please give me some suggestions..
Hi everyone,
Please give me some suggestions on the process that i am doing.
I have to send some data daily in a flat file to a third party vendor.
The data that i am extracting to a flat file comes from "differnt tables".
I have a PL/SQL proc which does all the logic and extract to a flat file.
As per third party vendor requirement we have to send one full file
(all the data in our database or tables) and after that changes only file
(records that got modified and New Records).we have Date_modified column
in every table to see whether that records got modified or not.
we need something to track what records we are sending
they dont want to depend only on that "date_modified" column.
they want to create a separate table to keep track all records that we are
sending to vendor.
Process:
First day: Insert all the records to a ---> log table(for tracking) with
SEND_REC = 'Y' (there is a column "SEND_REC" that says whether
to send that record or not) ----> send all the records from the
log table that has SEND_REC is "Y"
second day: compare the existing records with log table records --->if
there is any change update the log table
and for new records insert into log table --->
send the records from log table that has "SEND_REC" is
"Y"
thrid day: same as second day..
Is there any better way to do it? Please post how do you handle this type
of scenarios ?
ThanksSome thing you can achive with Merge
merge into ..
using(select blah blah from xxxx
minus
select blah blah from yyyy)
on(----)
when matched then
update set
when not matched then
insert ....;Assmuing this will give you difference between your records
select blah blah from xxxx
minus
select blah blah from yyyyEdited by: user5495111 on Aug 6, 2009 7:06 AM -
TS1398 I can not turn on wi fi in i phone 4s so please give me some suggestion to start my wifi
I can not turn on wi fi in i phone 4s so please give me some suggestion to start my wifi
http://support.apple.com/kb/TS1398
-
Please give me some suggestion!
I want to concentrate on programming and network, and my university provides the following paper, so can you give me some suggestion, show me what paper should I choose?
1. Advanced Data Communications
The application of OSI data communication systems. Topics covered include: the OSI layered model, ASN 1 and object modelling, OSI control, mail systems, directory systems, OSI applications
2. Advanced Database Systems
An in-depth examination of the technical aspects of database systems providing the essential foundation for a career in database systems. The emphasis will be to keep abreast with available database technology approaches and techniques in industrial and commercial information systems.
3. Software Engineering
Software Engineering is a discipline that integrates methods, tools and procedures for the development of computer systems. The course addresses a range of software development paradigms and processes and assesses these models against the broad array of tasks needed to develop and maintain information systems. Emphasis is on the IEEE standards to develop effective information systems.
4. Computer Organisation
The functioning and organisation of modern computer systems. Architecture of computers and computer systems. Processor organisation and implementation. Data representation and instruction formats, microprogramming, input/output systems, virtual memory and hierarchical memory systems.
5. Data Communications Fundamentals
The structure of data communications and networks, particularly the lower levels of the communications architecture hierarchy. The OSI communications model, data transmission and coding, link-level protocols, local area networks, wide area networks and internetworking, transport protocols, introduction to ISDN, BISDN, Frame Relay.
6. Algorithmics
Further development of problem-solving and algorithm design methods, including: induction, divide-and-conquer, dynamic programming, greedy algorithms and graph algorithms. New topics such as: proof of correctness, amortised complexity, complexity lower bounds, decision trees, backtracking, branch-and-bound, probabilistic algorithms, advanced information structures and NP-completeness.
7. Language Implementation
The compilation and interpretation of computer languages, lexical analysis, top-down and bottom-up parsing, interpreters, procedure call conventions, symbol table analysis, code generation for control structures and expressions, attribute grammars
8. Distributed Objects and Algorithms
This course gives an appreciation of modern client-server development, based on distributed objects and their integration with databases and the Web. A comparative study of relevant technologies such as RMI, CORBA and DCOM.
9. Operating Systems
What is an operating system? Operating system principles: concurrent processes, processor management, memory management, disk management, management of other peripherals, computer security. Interacting with people: system implementation and job control languages.
10. Mathematical Foundations of Computer Science
The aim is to create a mathematical model for computers and computation, and to derive results about what can and cannot be computed. The course deals with idealised computers (automata) which operate on idealised inputs and outputs (formal languages).
11. Functional and Logic Programming
A practical introduction to programming in functional and logic programming languages. In particular, the course introduces a declarative style of programming, in which the emphasis is placed more on what a programme achieves than how it is to achieve it.
12. Introduction to Artificial Intelligence
An introduction to artificial intelligence (AI). AI is concerned with the construction of computer systems that perform tasks usually thought to require intelligence, such as playing chess or diagnosing an illness. The course introduces the basic concepts of AI, as well as a number of advanced topics.
13. Graphics and Graphical User Interface Programming
Fundamentals of 2D computer graphics: physical and virtual graphical I/O devices, graphical toolkits, transformations, algorithms. An introduction to 3D graphics: projection, transformations, visible-surface determination. Advanced GUI programming. Building software components. Software engineering.
pick maximun 7 papaer from the above. could you order your suggestion from move favourite to less?
Thank you for you time.Hi
Please do not poast such kind of request at this site.
Anyway it should be
8
9
7
6
5
2
1
You can change the order but the subject for relevance is as mentioned.
Bye -
Urgent!!! please give me some advice
i quite new in J2ME programming. i encountered a problem that my MIDlet cannot pass parameter to servlet. i had tried to not using os.flush(), but it's still not working. please give me some suggestion!
MIDlet
* Login.java
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.io.Connector;
import javax.microedition.io.HttpConnection;
import javax.microedition.io.StreamConnection;
import java.io.DataOutputStream;
import java.io.DataInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
import java.util.*;
public class Login extends MIDlet implements CommandListener {
Display display;
boolean commandAvailable;
// String idPassword;
CommandThread commandThread;
Form inputForm;
Form outputForm;
TextField userid;
TextField password;
StringItem response;
Command cmdExit;
Command cmdOK;
public void startApp() {
display = Display.getDisplay(this);
inputForm = new Form("Authorization");
userid = new TextField("User",null,25, TextField.ANY);
inputForm.append(userid);
password = new TextField("Password",null, 15, TextField.PASSWORD);
inputForm.append(password);
cmdOK = new Command("OK",Command.SCREEN,1);
cmdExit = new Command("Exit",Command.EXIT,1);
inputForm.addCommand(cmdOK);
inputForm.addCommand(cmdExit);
inputForm.setCommandListener(this);
outputForm = new Form("Student Option");
response = new StringItem(null,null);
outputForm.append(response);
outputForm.addCommand(cmdExit);
outputForm.setCommandListener(this);
commandAvailable = false;
commandThread = new CommandThread(this);
commandThread.start();
display.setCurrent(inputForm);
public void pauseApp() {
public void destroyApp(boolean unconditional) {
public void commandAction(Command cmd, Displayable d) {
if (cmd == cmdExit) {
destroyApp(false);
notifyDestroyed();
else if (cmd == cmdOK)
synchronized (this) {
commandAvailable = true;
notify();
class CommandThread extends Thread {
MIDlet parent;
boolean exit = false;
public CommandThread(MIDlet parent) {
this.parent = parent;
public void run() {
while (true) {
synchronized(parent) {
while(!commandAvailable) {
try {
parent.wait();
catch (InterruptedException e) {
commandAvailable = false;
performLogin();
public void performLogin() {
HttpConnection conn = null;
InputStream is = null;
OutputStream os = null;
byte[] receivedData = null;
try {
String url = getAppProperty("Login.URL");
conn = (HttpConnection)Connector.open(url);
byte[] postData = createPostData();
conn.setRequestMethod(HttpConnection.POST);
conn.setRequestProperty("User-Agent", "Profile/MIDP-1.0 Configuration/CLDC-1.0");
conn.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
conn.setRequestProperty ( "Content-Length", Integer.toString (postData.length));
// conn.setRequestProperty("Accept", "application/octet-stream" );
conn.setRequestProperty("Connection", "close" );
// byte[] postData = createPostData();
System.out.println("postData="+postData);
conn.setRequestProperty("Content-length",Integer.toString(postData.length));
os = conn.openOutputStream();
os.write(postData);
for (int i=0;i<postData.length;i++)
os.write(postData);
// os.flush();
os.close();
is = conn.openInputStream();
String contentType = conn.getType();
int len = (int)conn.getLength();
if (len > 0) {
receivedData = new byte[len];
int nb = is.read(receivedData);
else {
receivedData = new byte[1024];
int ch;
len = 0;
while ((ch = is.read()) != -1) {
receivedData[len++] = (byte)ch;
response.setText(new String(receivedData,0,len));
display.setCurrent(outputForm);
catch (IOException e) {
System.out.println(e.getMessage());
e.printStackTrace();
finally {
try {
if (is != null) {
is.close();
if (os != null) {
os.close();
if (conn != null) {
conn.close();
catch (IOException e) {
public byte[] createPostData() {
StringBuffer sb = new StringBuffer();
sb.append("userid=");
sb.append(userid.getString());
sb.append("&password=");
sb.append(password.getString());
System.out.println("sb = <" + sb.toString() + ">");
return sb.toString().getBytes();
servlet
import java.io.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class LoginServlet extends HttpServlet {
static final String dbURL = "jdbc:mysql://localhost/projectdb?" + "user=wongyuenmei&password=wongyuenmei";
public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException {
Connection conn = null;
String nextJSP = null;
try {
Class.forName("org.gjt.mm.mysql.Driver");
catch (ClassNotFoundException e) {
throw new ServletException("Unable to load JDBC driver");
try {
String id = request.getParameter("userid").trim();
String pass = request.getParameter("password").trim();
if (id==null)
String tempid=id;
String temppass=pass;
conn = DriverManager.getConnection(dbURL);
Statement stmt = conn.createStatement();
String query = "SELECT cno, idno " + "FROM student " + "WHERE idno = '" + id + "'AND password ='" + pass + "'";
ResultSet rs = stmt.executeQuery(query);
if (rs.next()) {
StringBuffer fullName = new StringBuffer();
fullName.append(rs.getString(1));
fullName.append(" ");
fullName.append(rs.getString(2));
request.setAttribute ("fullName", fullName.toString());
nextJSP = "/LoginOK.jsp";
else {
StringBuffer temptest = new StringBuffer();
temptest.append(tempid);
temptest.append(&temppass);
request.setAttribute("temptest", temptest.toString());
nextJSP = "/LoginFailed.jsp";
conn.close();
ServletConfig config = getServletConfig();
ServletContext context = config.getServletContext();
RequestDispatcher rd = context.getRequestDispatcher(nextJSP);
rd.forward(request, response);
catch (SQLException e) {
throw new ServletException("SQL call failed");
catch (Exception e) {
throw new ServletException(e.getMessage());
finally {
if (conn != null) {
try {
conn.close();
catch (SQLException e) {
throw new ServletException("connection close failed");
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
doPost(request, response);
ur help is very appreciated!Still the same problem. All the parameter get by server are null.
Using GET, and add parameter to url, everything is fine.
encodedPostData = "E2EE_PAM_ID"+"="+E2EE_PAM_ID+"&"+"E2EE_USER_ID"+"=" E2EE_USER_ID"&"+"E2EE_USER_SEGUID"+"="+E2EE_USER_SEGUID+"&"+"E2EE_RPIN"+"="+E2EE_RPIN
+"&LoginBtn=Login";
c = (HttpConnection)Connector.open(request);
c.setRequestMethod(HttpConnection.POST);
c.setRequestProperty("User-Agent","Profile/MIDP-1.0 Configuration/CLDC-1.0");
c.setRequestProperty("Content-Type:","application/x-www-form-urlencoded");
os = c.openOutputStream();
os.write(encodedPostData.getBytes());
//os.flush();
System.out.println(encodedPostData);
rc = c.getResponseCode();
if (rc != HttpConnection.HTTP_OK) {
throw new IOException("HTTP response code: " + rc);
is = c.openInputStream();
.......... -
Cascading Select Lists - Not Working for me
I am trying to implement Denes Kubicek's Ajax Cascading Select List solution.
http://apex.oracle.com/pls/otn/f?p=31517:119
But it is not working for me.
I'm a newbie to APEX and checked the forum for advice on cascading select lists. I saw the thread for
"Cascading Select Lists - Not Working" posted by sue and the replies by Varad Acharya, but I'm still
having issues of not seeing the alerts, not able to run the pl/sql process in SQL Workshop, and not
getting the expected results.
I have a list of countries (US - USA, CA - CANADA, etc.) and a list of states for each country. When a
user selects a country I would like to show the list of states within that country.
This is what I've done so far:
Defined an application process:
Process Point: On Demand: Run ... by a page process.
Name: CASCADING_SELECT_LIST1
Process Text:
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="' || 99 || '">' || '- All States -'
|| '</option>'
FOR c IN (SELECT state_code || ' - ' || state_desc d, state_code r
FROM tbk_state
WHERE country_code = :cascading_selectlist_item_1)
LOOP
HTP.prn ('<option value="' || c.r || '">' || c.d || '</option>');
END LOOP;
HTP.prn ('</select>');
END;
defined and application item:
Name: CASCADING_SELECTLIST_ITEM_1
Build Option: - No Build Option -
Created a 'Form on a table with report' as follows:
Page 5: Report on TBK_HARDWARE_LOCATION
Page 6: Form on TBK_HARDWARE_LOCATION
in HTML Header of the page attributes for 'Form on TBK_HARDWARE_LOCATION' I have:
<script language="JavaScript" type="text/javascript">
<!--
htmldb_delete_message='"DELETE_CONFIRM_MSG"';
//-->
</script>
<script>
function get_select_list_xml1(pThis,pSelect){
var l_Return = null;
var l_Select = html_GetElement(pSelect);
alert ('Dept no=' + pThis.value);
var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
'APPLICATION_PROCESS=CASCADING_SELECT_LIST1',0);
get.add('CASCADING_SELECTLIST_ITEM_1',pThis.value);
gReturn = get.get('XML');
// gReturn = get.get();
alert('Enames=' + 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");
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>
On Page 6: 'Form on TBK_HARDWARE_LOCATION' I have the following items (plus some others):
Name: P6_COUNTRY_CODE
Display as: Select List
HTML Form Element Attributes: onchange="get_select_list_xml1(this,'P6_STATE_CODE');"
Source Used: Only when current value in session state is null
Source Type: Database Column
maintain session state: Per session
Source value or expression: COUNTRY_CODE
Named LOV: LIST OF COUNTRIES
Name: P6_STATE_CODE
Display as: Select List
Source Used: Only when current value in session state is null
Source Type: Database Column
maintain session state: Per session
Source value or expression: STATE_CODE
Named LOV: - Select named LOV -
List of Values definition:
select state_code || ' - ' || state_desc d, state_code r
from tbk_state
where country_code = :P6_COUNTRY_CODE
order by 1
LIST OF COUNTRIES is defined as:
select country_code || ' - ' || country_desc d, country_code r
from tbk_country
order by 1
Now to the problem:
I run page 5 (the report) to see the list of locations and then I try to edit a record (page 6). When I
try to select a different country I get the following error (on IE):
"Problems with this web page might prevent it from being displayed properly or functioning properly.
In the future, you can display this message by double-clicking the warning icon displayed in the status
bar.
Line: 17
Char: 5
Error: Object expected
Code: 0
URL: http//cmrac4.cm.timeinc.com:7777/pls/htmldb/f?
p=114:6:1413254636072443110::::P6_HARDWARE_LOCATION_ID:2
I don't see any of the alert messages.
I also tried to run the application process code in the SQL - Command Processor (I replaced
:cascading_selectlist_item_1 with 'CA' or 'US') and got the following:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh
button, or try again later.
Only one top level element is allowed in an XML document. Error processing resource
'http://cmrac4.cm.timeinc.com:7777/pls/...
<select><option value="99">- All States -</option><option value="X1">X1 - X1</option><optio...
Can someone help me please?Varad,
First, thank you for taking the time to try to help me with this problem.
When I view the page's source code (here are the first few lines):
<html lang="en-us">
<head>
<script src="/i/javascript/core.js" type="text/javascript"></script>
<link rel="stylesheet" href="/i/css/core.css" type="text/css" />
<script language="JavaScript" type="text/javascript">
<!--
htmldb_delete_message='Would you like to perform this delete action?';
//-->
</script>
<script>
function get_select_list_xml1(pThis,pSelect){
var l_Return = null;
var l_Select = html_GetElement(pSelect);
//alert ('Dept no=' + pThis.value);
var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
'APPLICATION_PROCESS=CASCADING_SELECT_LIST1',0);
get.add('CASCADING_SELECTLIST_ITEM_1',pThis.value);
gReturn = get.get('XML');
// gReturn = get.get();
//alert('Enames=' + 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");
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>
It looks like line 17 is:
var l_Select = html_GetElement(pSelect);
I'm still not sure why I'm getting this error and why it's not working?
Thanks,
Eti -
Help with Cascading Select List in Tabular Form
Hello Friends,
I am trying to implement Denes Kubicek's sample for Cascading Select list and ran into this error:
Please help me identify what I might have missed ???
<code>
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
Only one top level element is allowed in an XML document. Error processing resource 'http://apex.oracle.com/pls/apex/f?p=12...
<select><option value="0">- Select Employee (0) -</option></select><html lang="en-us" xmlns:htmld...
</code>
Please find below the list of activities I performed:
1.Created the region source
2.Created the hidden items
3.Created the buttons and items
4.Created the application process for MRU and Delete
5.Created the Application item [ TAB_CASCADING_ITEM]
6.Created the Application Process[tab_casc_sel_list]
Any clue/pointers to debug this are welcome.
I tried the above on apex.oracle.com; WS: CHAITANYAPATCHIPULUSU; USERNAME :[email protected]
PWD:Satya123 in APPLICATION : 12855 and Page :35
Regards..OK, you didn't have the background process as an on demand process.
In the MRU and MRD process, you were referencing the wrong variables for the count. (as in deb's case, it's p176, but in your case its p35).
In the javascript function, the call that is supposed to assign : TAB_CASCADING_ITEM a value, isn't working (I believe). -
Cascading Select List Doesn't work properly
I am trying to use Cascading Select List in My Application. It works for the first time when I run the page afterwards when I try to open the same page in a different window it doesn't work afterwards it doesn't work at all.My code is as follows.
1) Application Process with name getDet
DECLARE
lv_os_List varchar2(32000) := '';
platform varchar2(50);
err_code number;
err_msg varchar2(200);
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 || '">' || '- All OS -' || '</option>');
select platform into platform from platform where platformid =:P139_PLATFORM;
if platform = 'Sun SPARC' then
for i in (select os , osid from ostype where os like '%Sola%' order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
ELSIF (platform ='Linux (x86 & x86-64)') then
for i in (select os ,osid from ostype where os like '%Linux%' or os like '%RH%' or os like '%SLES%' or os like '%OEL%' order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
ELSIF (platform ='TRU64') then
for i in (select os ,osid from ostype where os like '%Tru64%' order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
ELSIF (platform ='Windows') then
for i in (select os ,osid from ostype where os like '%Windows%' order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
ELSIF (platform ='IBM Linux on Power') then
for i in (select os ,osid from ostype where os like '%Linux%' or os like '%RH%' or os like '%SLES%' or os like '%OEL%' order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
ELSIF (platform ='IBM System z') then
for i in (select os ,osid from ostype where os like '%Linux%' or os like '%RH%' or os like '%SLES%' or os like '%OEL%' order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
ELSIF (platform like 'HP%') then
for i in (select os ,osid from ostype where os like '%HP%' order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
ELSIF (platform ='Itanium') then
for i in (select os ,osid from ostype where os like '%HP%' or (os like '%Windows%' and osid <> 201) or os like '%Linux%64%' or os like '%RH%64%'
order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
ELSIF (platform ='AIX') then
for i in (select os ,osid from ostype where os like '%AIX%' order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
ELSE
for i in (select os ,osid from ostype order by os) loop
htp.prn('<option value="' || i.osid || '">' || i.os || '</option>');
end loop;
END IF;
htp.prn('</select>');
EXCEPTION
WHEN OTHERS THEN
err_code := SQLCODE;
err_msg := substr(SQLERRM, 1, 200);
INSERT INTO ERROR_TABLE (error_number, error_message)
VALUES (err_code, err_msg);
END;
2) Application Item
CASCADING_SELECTLIST_ITEM_1
3) In the Footer of the region which contains the items the following Java Script
<script>
function get_select_list_xml(pThis,pSelect){
var l_Return = null;
var l_Select = html_GetElement(pSelect);
var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
'APPLICATION_PROCESS=getDet',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 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>
<script>
get_select_list_xml($x('P139_PLATFORM'),'P139_OS');
</script>
For the first Select list form element properties
onchange="get_select_list_xml(this,'P139_OS')"
Please let me know what change I need to make in the code.Vikas,
Is your page 0 a public page or it requires authentication? I remember having the same
problem a while ago.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/apex/f?p=107:7
http://htmldb.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
Issue with my Tabular form Cascading Select List
Hello Friends,
I have implemented a Cascading select list in a tabular form with the below SQL ...
SELECT apex_item.hidden(31,line_no)
|| apex_item.select_list_from_query(32, POLE_CODE_ID, 'select POLE,POLE_ID from CAP_PLAN_POLE_DETAILS', 'style="" '
|| 'onchange="f_set_casc_sel_list_item(this,'
|| 'f33_'
|| LPAD (line_no, 4, '0')
|| ')"', 'YES', '0', '- Select Pole -', 'f32_'
|| LPAD (line_no, 4, '0'), NULL, 'NO' ) POLE_CODE_ID,
apex_item.select_list_from_query(33, COUNTRY_CODE_ID, 'SELECT COUNTRY,COUNTRY_ID FROM CAP_PLAN_COUNTRY_DETAILS', 'style=""', 'YES', '0', '- Select Country -', 'f33_'
|| LPAD (line_no, 4, '0'), NULL, 'NO' ) COUNTRY_CODE_ID,
apex_item.text(34,LEGAL_ENTITY) LEGAL_ENTITY,
apex_item.text(35,BUSINESS) BUSINESS,
apex_item.text(36,COUNT_OF_NAMED_USERS,NULL,NULL,'onkeyPress="return OnlyNumbers(event)"') COUNT_OF_NAMED_USERS,
apex_item.text(37,COUNT_OF_CONCURRENT_USERS,NULL,NULL,'onkeyPress="return OnlyNumbers(event)"') COUNT_OF_CONCURRENT_USERS,
apex_item.text(38,INVENTORY_ORG) INVENTORY_ORG
FROM cp_sites_details
WHERE cap_plan_id = nv('P94_CP_ID')
UNION ALL
SELECT apex_item.hidden(31,NULL)
|| apex_item.select_list_from_query(32, 0, 'select POLE,POLE_ID from CAP_PLAN_POLE_DETAILS', 'style="" '
|| 'onchange="f_set_casc_sel_list_item(this,'
|| 'f33_'
|| LPAD (9900 + LEVEL, 4, '0')
|| ')"', 'YES', '0', '- Select Pole -', 'f32_'
|| LPAD (9900 + LEVEL, 4, '0'), NULL, 'NO' ) POLE_CODE_ID,
apex_item.select_list_from_query(33, NULL, 'SELECT COUNTRY,COUNTRY_ID FROM CAP_PLAN_COUNTRY_DETAILS WHERE POLE_ID=0', 'style=""', 'YES', '0', '-
SELECT Country -', 'f33_'
|| LPAD (9900 + LEVEL, 4, '0'), NULL, 'NO' ) COUNTRY_CODE_ID,
apex_item.text(34,NULL) LEGAL_ENTITY,
apex_item.text(35,NULL) BUSINESS,
apex_item.text(36,NULL,NULL,NULL,'onkeyPress="return OnlyNumbers(event)"') COUNT_OF_NAMED_USERS,
apex_item.text(37,NULL,NULL,NULL,'onkeyPress="return OnlyNumbers(event)"') COUNT_OF_CONCURRENT_USERS,
apex_item.text(38,NULL) INVENTORY_ORG
FROM dual
WHERE :REQUEST='ADDSITES'
CONNECT BY LEVEL = 2The filters to list the countries[2nd col of SQL, field : f33] will work on Change of Pole after a selection is made..the whole list of countries will appear with out the Pole being considered. I understand that is the case because, I have not used PoleID in the query for f33
SELECT COUNTRY,COUNTRY_ID FROM CAP_PLAN_COUNTRY_DETAILS'Now, how can I fix this to use the Pole Id every time the country Select List is touched..Can I just modify the query or should I add a Java Script OnChange function to handle this...
Please please help..
Thanks for reading the question...Isn't this given in my example:
http://apex.oracle.com/pls/otn/f?p=31517:176
The second list is extended by adding:
|| 'WHERE deptno = '
|| c001to make sure it renders correctly once you call your report. In your case the second list would be extended by adding the following
apex_item.select_list_from_query(33, COUNTRY_CODE_ID, 'SELECT COUNTRY,COUNTRY_ID FROM CAP_PLAN_COUNTRY_DETAILS ' || 'WHERE POLE_ID = ' || POLE_CODE_ID
, 'style=""', 'YES', '0', '- Select Country -', 'f33_'
|| LPAD (line_no, 4, '0'), NULL, 'NO' ) COUNTRY_CODE_ID,and that should work.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
------------------------------------------------------------------- -
I keep missing something from the samples i have seen on the internet on cascading select lists
I simple need one select list to determine the choices of another select list, Please use simple terms.
Thanks for your help. Please need asap.Hi,
OK - first you should have a hidden item 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 select lists - say P2_STATE_CODE and P2_CITY_CODE.
It helps if you ensure that the P2_STATE_CODE list is set with a default value to ensure that the list can be filtered correctly. Create a Computation, to run in the "Before Header" process point and conditional on P2_STATE_CODE being null (Condition Type: Value of Item in Expression 1 is NULL; Expression 1: P2_STATE_CODE). Set the value to a "Static Assignment" of something that won't appear in the list (eg, ZZ for strings or -1 for numerics). You can do this on the Cities list as well if you like. Both lists should be set to display null values and have something like -Select- as the null display text.
Your States list 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_CODEYour Cities list is a normal Select List 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 passed into P2_COUNTRY_CODE before page 2 is loaded. The default values for P2_STATE_CODE and P2_CITY_CODE are set and the lists are generated - the Cities list will display all cities for the Country selected as the States list will only show the default of ZZ and this "matches" every city in the country. Then, when the user selects an item on the States list, the page is submitted and the value for P2_STATE_CODE is updated in session. As the Cities list 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 have to ensure is that P2_STATE_CODE and P2_CITY_CODE are cleared from cache when you no longer need the page - you can do this in the branch back to page 1.
Andy -
Autofill cascading select lists
Hello,
Can anyone please help me out with implementing an autofill cascading select lists. If anyone has implemented a sample example ; can you please provide me the link.
thanks,
ortonWhich version of Apex you r using?
If its 3.2 you can refer to this link: http://htmldb.oracle.com/pls/otn/f?p=31517:119:2521957760329919:::RP,::
if its 4.0 then enter the name of parent item in "Cascading LOV Parent Item(s)" property of the select list
and use the parent Item name in the where clause of select list query, like this.
Select name d, eid r from emp where emp_id in(select emp_id from dept_emp where dept_id = :p01_1);
where employee select list is the child and the department is the parent select list.
Thanks
Tauceef -
Cascade Select list with Tabular Form
Hi,
I am trying to implement Cascade Select List functionality on a tabular form where users should be able to add multiple rows. The data should be saved to a temporary stage area, where users can review the data prior to saving to the table. Very similar to the shopping cart where one can Delete/Update rows by record. I believe there is a way to do it via APEX Collections. If anyone has an example it would definitely help. FYI, Running on APEX 3.2, so no built in cascade functionality.
Thank you,
ChanduIf you received a reply or figured out how to do this, can post? I need to implement exact same functionality and have not figured out how to do so. Have pinged Denes K. for source code on his demo app but not yet received response. Can this be done using wizard tab form or does it have to be a manually tab form?
-
How to populate another page item based on cascading select lists?
Oracle 10gXE
APEX 3.2
I've created cascading select lists based on the examples (using Javascript and AJAX) that i've seen on this forum. Thanks for help on that!
Now that I have these LOV's being populated without needing to submit the page, how do I take the value that is presently in each LOV and concatenate them together to populate another page item? I'm trying to build the URL string that will execute an Oracle Report once the user clicks a button.
Previously, when I had multiple Select Lists with a submit, the URL was being put together using an After Submit Computation that would set the value for an item (P26_REPORT_URL) on the page. Notice that a report parameter (i.e. parameter name and Select List value) is only included if the user has provided a value. The page item that holds these values is then referenced by a button for URL redirect. The URL Target for the button currently is: javascript:popupURL('&P26_REPORT_URL.'), but will not work at the moment because P26_REPORT_URL page item is not changing based on what is selected in the LOVs. Since I'm not submitting anything (do I need to?), how do I put together the values needed?
Computation for P26_REPORT_URL:
DECLARE
l_param VARCHAR2(2000);
BEGIN
l_param := '&REPORTS_URL.&report=&P26_RPT_VIEW..rdf&desformat=&P26_DESFORMAT.&destype=cache';
IF REPLACE(:P26_OLO_CODE,'%'||'null%',NULL) IS NOT NULL THEN
l_param := l_param||'&p_olo_code=&P26_OLO_CODE.';
END IF;
IF REPLACE(:P26_BEG_DATE,'%'||'null%',NULL) IS NOT NULL THEN
l_param := l_param||'&p_start_dt=&P26_BEG_DATE.';
END IF;
IF REPLACE(:P26_END_DATE,'%'||'null%',NULL) IS NOT NULL THEN
l_param := l_param||'&p_end_dt=&P26_END_DATE.';
END IF;
IF REPLACE(:P26_ORG_CODE_2,'%'||'null%',NULL) IS NOT NULL THEN
l_param := l_param||'&p_org_code=&P26_ORG_CODE_2.';
END IF;
IF REPLACE(:P26_FLAIR_ORG_2,'%'||'null%',NULL) IS NOT NULL THEN
l_param := l_param||'&p_flair_org_code=&P26_FLAIR_ORG_2.';
END IF;
IF REPLACE(:P26_BUDGET_ENTITY_2,'%'||'null%',NULL) IS NOT NULL THEN
l_param := l_param||'&p_agy_code=&P26_BUDGET_ENTITY_2.';
END IF;
RETURN l_param;
END;Andy,
This is a great suggestion! After I posted, I started looking at a Javascript solution and figured it's probably what I had to do.
However, now the cascading select list no longer working for some reason after I added the function to concatenate the item values. When I remove the showReport() function the select list works again.
Here is what I have in the HTML Header portion of the page:
<script language="JavaScript" type="text/javascript">
function popupURL (url) {
w = open(url,"winLov","resizable=1,width=800,height=600");
if (w.opener == null)
w.opener = self;
w.focus();
function showReport()
var l_param = '&REPORTS_URL.&report=' + $v('P26_RPT_VIEW') + '.rdf&desformat=' + $v('P26_DESFORMAT') + '&destype=cache';
if ($v('P26_OLO_CODE' != '')
l_param += '&p_olo_code=' + $v('P26_OLO_CODE');
if ($v('P26_ORG_CODE_3' != '')
l_param += '&p_org_code=' + $v('P26_ORG_CODE_3');
popupURL(l_param);
function get_AJAX_SELECT_XML(pThis,pSelect){
var l_Return = null;
var l_Select = $x(pSelect);
var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=ORG_SELECT_LIST',0);
get.add('TEMPORARY_ITEM',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 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> -
Cascading Select list in tabular from
Looked at Denes example on Cascading Select Lists - http://apex.oracle.com/pls/otn/f?p=31517:119:2294401989620845.
Want to have the primary select list as an item in a region, then the secondary select list as
a column in a tabular form in the same region. Is this possible?
The Onchange event is placed in the HTML Form Element Attributes for a page item but a column on a tabular form doesn't have this.
Can the Element Attributes or Element Option Attributes be used to hold the OnChange event code?On trial basis, i tried to implement code provided on [http://htmldb.oracle.com/pls/otn/f?p=31517:176:3223246187469527::NO|http://htmldb.oracle.com/pls/otn/f?p=31517:176:3223246187469527::NO]
I have same table DEPT & EMP HAVING same data. i created application items & processes. But My tabular form display column headings & null in each column. -
Cascading select list issue in a tabular form
hello,
how can i implement cascading select list for filtering my tabular form report results.
Like i want to have the cascading select list above the tabualr form report such that when i select the value and try to click a button, my tabular form report should filter the report based on the select list value.
i want to have three select list items above my report - and these select list are dependent on one other - tats why i want to make them cascading select list.
can anyone help me out with cascading select list.
thanks.Thank you so much for the quick response saved my life!.
For future reference let examples of the use of APEX_UTIL.SAVEKEY_VC2 and APEX_UTIL.KEYVAL_VC2
This is the query of the Tabular Form
SELECT den.cod_encuesta,
den.cod_det_encuesta,
den.cod_pregunta,
pre.nombre_pregunta,
den.respuesta,
den.observaciones,
APEX_UTIL.SAVEKEY_VC2(den.cod_pregunta) codpreg
FROM enc_det_encuesta den, enc_pregunta pre
WHERE den.cod_pregunta = pre.cod_pregunta
AND den.cod_encuesta = :P6_COD_ENCUESTAThis is the query "Select list"
SELECT nombre_respuesta, cod_respuesta
FROM enc_respuesta
WHERE cod_pregunta = APEX_UTIL.KEYVAL_VC2regards
Gerard
Maybe you are looking for
-
Need help in creating a view with Encryption for hiding the code used by the multiple users
Hi, Can anyone help me out in creating view with encryption data to hide the stored procedure logic with other users. I have create a stored procedure with encryted view but while running this manually temporary views are getting created, therefore t
-
Sql Queries - adding calculated variables to views
Hello: I'm trying to do add a calculated variable to my view that isn't an Entity Attribute, its simple really but i don't know if I'm leaving something out or not. I add the "new Attribute" , call it nCompleted, type - number I then check off everyt
-
How to change organizational unit .
Hi Experts, I have a rule in which some responsibilities are defined. Could anyone please tell me how to change the values in the Rule like I want to change the persons listed there to someone else. Also if there is any way to change the organization
-
Just looking for a general idea on MCS server sizing for CCM and IPCC Express. I understand actual sizing needs to be done by a partner with the Cisco tool. My understanding from SRND is that all servers within a CCM cluster should be the same size (
-
I have purchased Adobe Photoshop Elements 10 & Adobe Premiere Elements 10. I have a 2.5 year old Toshiba Satellite Pro with Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHZ 791Mhz, 1.87 GB of Ram. I have Winows XP Professional 2002 Service Pack 3. I instal