**urgent*** -two combo boxes -one database table - ***urgent**
1. i have one html page - in that two combo boxes are there
2. first one called--> Bank Name and second one called-->Main Branch
3. i have a database table like BANK_MASTER(MAIN_BRANCH,BANK_NAME)
i am giving here some data for the above table:
(sbi-kurnool, sbi),(sbi-cadapah,sbi),(sbi-chittor,sbi),(ab-rangareddy,ab),(ab-varangal,ab) ..like that every bank has its own main branch in different location.
MY PROBLEM:
In HTML page, in the first combo box ie., Bank Name will display all the bank name using the table BANK_MASTER ie.,sbi,ab,cb,sbh ...... (its ok - i too get )
main Problem: Whenever i select a particular bank name in the first combo box, the second combo box ie.,Main Branch has to display the main branches using the table Bank_Master depending on the Selected bank name from the Bank Name Combo box ( ie., if we select the sbi, it has to display all main branches of sbi's only, but not other bank's main branches)
Hi friend,
I had a similar situation and i tried to solve it by using XmlHttpRequest Object(used in AJAX).
U can checkout the below example just for further reference delete
UserForm.jsp:
==========
<head>
<script>
var xmlHttp
function showState(str)
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
alert ("Browser does not support HTTP Request")
return
var url="getState.jsp"
url=url+"?count="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChange
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
function stateChange()
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
document.getElementById("state").innerHTML=xmlHttp.responseText
</head>
<body>
<select name='country' onchange="showState(this.value)">
<option value='india>india</option>
</select>
<br>
<div id='state'>
<select name='state' >
<option value='-1'>pickone</option>
</select>
</div>
</body>
getState.jsp
============
<%@page language="java" import ="java.util.Hashtable" import ="java.util.Set" %>
<%
String country=request.getParameter("count");
response.setContentType("text/html");
response.setHeader("Cache-Control","no-cache");
try{
Hashtable ht = (Hashtable)session.getAttribute("<ATTRIBUTE_NAME>");
String buffer="<select name='state'><option value='-1'>Pick One</option>";
Set s=ht.keySet();
Object keys[]=s.toArray();
int size=keys.length;
for(int i=0; i < size;i++){
buffer=buffer+"<option value='"+ht.get(keys).toString()+"'>"+ht.get(keys).toString()+"</option>";
buffer=buffer+"</select>";
response.getWriter().println(buffer);
catch(Exception exp){
response.getWriter().println(exp);
%> I think u may go upon replacing country with your Main Branch and vice versa
Similar Messages
-
How to link two combo boxes? (urgent)
Hello,
I am wondering how to link two combo boxes in Acrobat Pro 9. Basically, I need to link a building with a list of rooms. There are 3 building choices in my first combo box. For the sake of example, Building A, Building B and Building C. When one of the buildings is selected, I want a 2nd combo box to display the rooms that are located in that building. So by selecting building A, you would then be able to choose a room from the list of available rooms in the second drop box. The buildings cannot share a list of rooms because they have the same room numbers. Is anyone able to help?
- TravisYou can also use ajax. When the first combo box element is selected, it will call the ajax function and that ajax function will bring the data from the database and place it in second combo box.
-
Question abt. combo box and database
Hi. I have two combo boxes, A and B. Items in A is obtained from table X, Items in B is obtained from table Y. But, the problem is that whatever appears in combo box B should not contain those in combo box A. How do i go about doing this? Note that values in table X come from values in table Y.Here's an example:
(this is I currently have)
Combo X Combo Y
Apple Mango
Orange Kiwi Fruit
Pineapple Apple
Kiwi Fruit
Mango (this is I WANT)
Combo X Combo Y
Orange Mango
Pineapple Kiwi Fruit
ApplePlease help and thanks in advance.hi....
First of all, I've designed the two combo boxes with Add/Delete buttons in the GUI. I'm using JSP to retrieve values from database table into my combo boxes.
Actually, I have the two combo boxes already. I have already got the items inserted into combo A from table X using JSP. I am thinking of getting all the values in combo box B from the table Y first, then maybe store them in an array or something, b4 comparing those values with that from combo box A, eliminate those existing in combo box A, and the rest will be stored in combo B.
I do not know exactly how to store values i obtained from table to an array and how to compare arrays.
hope u understand what i'm trying to say, please help if possible, thanks. -
Populate 2 infoobjects from One database Table
Hi,
I have two infoobjects INOBJ1 & INOBJ2 & one database table TABLE1(on SAP systems connected via UDI) having fields F1 F2 & description D1.
I would like to extract data & populate either INOBJ1 or INOBJ2 with F2,D1 data based on field F1.
Please let me know the fastest & easiest way to do this.
Thanks & warm regards,
SunilHi sunil,
Write piece of ABAP code based on what condition you want..to fetch the field F2 from table1..
Check the standard generic extractor for template..
your case..
select F2 D1 from table1...where F1 = "condiiton"..
Regards
Manga(Assign points)
Message was edited by: Manga -
How to compare value of two Combo Box
I've two Combo Box(cbFirst & cbSecond). I want to compare the value that has been selected by the user and based on the result, output is displayed. In both Combo Box I've provided the value.
Here is my code:
var a:Number;
var b:Number;
function First(evt:Event):void{
a = evt.target.value;
trace(a);
cbFirst.addEventListener(Event.CHANGE, First);
function Second(evt:Event):void{
b = evt.target.value;
trace(b);
cbSecond.addEventListener(Event.CHANGE, Second);
If (a > b){
trace("a is greater")
else
trace(b is greater);
The trace statement inside the functions are working fine and the correct value of a & b is printed. But the comparison in the if statement doesn't seem to work. Could you please help me out.there's a typo. fix it or remove it:
var a:Number;
var b:Number;
function First(evt:Event):void{
a = evt.target.value;
trace(a);
compareF();
cbFirst.addEventListener(Event.CHANGE, First);
function Second(evt:Event):void{
b = evt.target.value;
trace(b);
compareF()
cbSecond.addEventListener(Event.CHANGE, Second);
function compareF(){
If (a > b){
trace("a is greater")
else
trace(b is greater); -
Problem in showing combo box in the table
Hello guys i just add up the combo box in the table but the problem is when i change the line in the table the combo disappear. i want it to be visible even if it is not in the selected row. i want that user can see the combo box in the table without clicking on it.
Please help;http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
Look in the page bottom ! -
To create workflow process which periodically examines one database table??
hi.......
plz tell me the complete details that how to create workflow process which periodically examines one database table??
also it will send email to specific address if certain condition is not fulfilled??
help is really appreciated
thanks nd regards
manish singlaHi,
I'd be wary of using a WAIT activity, since this will essentially have the workflow running forever in the same SQL session. If you ever need to shutdown the database, then you would have to kill the session (or do a shutdown abort), which will rollback all the Workflow transactional data.
I would leave the polling logic to a process outside the Workflow engine. In an Applications environment, this should be a Concurrent request. If this is standalone Workflow, then schedule something using DBMS_JOB. The job should check the database, and if necessary, initiate a new workflow to send the notification.
If the notification does not require a response, then I would be inclined to bypass Workflow competely, and have a job which calls UTL_SMTP to send an email.
HTH,
Matt
Alpha review chapters from my book "Developing With Oracle Workflow" are available on my website:
http://www.workflowfaq.com
http://forum.workflowfaq.com -
I have dragged and dropped one of my view objects as a table on a JClient form. Is there a way I can show one of the columns as a combo box?
MilosURGENT!!!!!!!! Using a topic title like "URGENT" followed by exclamations is one sure way to not get an answer from people on the forum.
This is urgent... Not for us it isn't. Implying that your question is any more important than any other question on the forum is another way to not get a response.
Anyway your question is like big run on sentence and I have no idea what you are asking or what your problem is or what your code looks like.
If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting. -
Can we give two combo box destination in same rows and coloumn?
Hi Experts,
Can you tell me Is it possible two combo destination in same rows and coloumn. If possible explain me..
i have tried first destination place in one particular cells and second placed it same place. while running it shows second one placed value only showing.
First combo box value is not showingHi Manikandan
What are you trying to achieve here? Offcourse, later will replace the previous. How do you need it to behave like? What is the ultimate goal?
Runali -
How do I copy recordsets from one database table to another?
I am using the Database Connectivity Toolset, and would like to copy either one recordset or multiple recordsets from one Access table to a table in a different database. I would like to do it directly with the data in variant form, but I can't get it to work. I can get it to work(on a small test table) if I first convert my source variant data to a cluster, then insert that into the other database table. My real database has many items with a variety of date types. Can I copy directly variant to variant?
Is it necessary to read all the data back into LabVIEW first? The reason I'm asking is that it is much more efficient to just use SQL statements to get the data you need and write that directly to the second database. I did a quick Google search on it and came up with lots of responses on what the correct syntax is for setting that up. Using an SQL command to copy the data back and forth is analogous to copying data from one file to another using the Copy file function rather than reading the entire contents of the file, converting the file string to the data arrays, converting back to a string, and then writing it back to another file.
Chapter 5 of the Database Connectivity Toolset User Manual describes how to execute SQL queries.
If you do need to actually
see the data in LabVIEW first, then the only way to get it back into the other database is to convert those variants to LV datatypes and then cluster those values again and write them back out to the second database. -
Value of two combo box is not persistent on change of a third combo box
Hi All:
I have flex page in which i have 3 combo boxes. I would be
selecting first 2 combo box and when i select the third combo box ,
i would get the value of previous two combo selection and display
data accordingly.
My problme here is when i do a change in 3rd combo box the
values of other combo boxed are defaulted to "Select..." without
maintaining my previous selection.
I am stuck in this for a while. I would really appreciate if
you can help me out in this.
Thanks
Kanthere's a typo. fix it or remove it:
var a:Number;
var b:Number;
function First(evt:Event):void{
a = evt.target.value;
trace(a);
compareF();
cbFirst.addEventListener(Event.CHANGE, First);
function Second(evt:Event):void{
b = evt.target.value;
trace(b);
compareF()
cbSecond.addEventListener(Event.CHANGE, Second);
function compareF(){
If (a > b){
trace("a is greater")
else
trace(b is greater); -
Linking combo boxes to a table
I have made a set of combo boxes that allow the user to input a home and away football team and their scores. I have also setup a table with 4 teams in it. How can i link the combo boxes so that EG:
If Arsenal 2 - 1 Chelsea is a result inputted how can i link it to a table so that Arsenal will go top with 3 points, 2 goal for, 1 against etc
Basically i need to update the table from the info supplied by the combo boxes???we don't tolerate that attitude either....
besides I gave u guidelines, check the other thread, but u can be sure that nobody will help you if u keep this attitude...
READ the links I posted in that other thread, work on the issue then come back with questions and post your code so that we know how to help you based on your code..that's how it works here.. -
TWO MASTER AND ONE DETAIL TABLE
HI,
I HAVE TWO SEPARATE MASTER TABLE WITH SAME DETAILS I MADE ONE DETAIL TABLE REFERENCES BOTH OF THE MASTER TABLES(BOTH MASTER HAVE SAME PRIMARY COLUMN NAME) , BUT WHEN INSERT RECORD IN DETAIL IT GIVES ME ERROR THAT PARENT KEY NOT FOUND(ALTOUGH I HAVE INSERTED MASTER DATA IN ONE MASTER TABLE BUT NOT THE SECOND ONE AND IT'S NOT POSSIBLE TO INSERT SAME DATA IN SECOND MASTER TABLE), WHAT I WANT TO ASK THAT HOW IT'S POSSIBLE TO USE SAME DETAIL TABLE WITH DIFFERENT MASTER TABLES. STRUCTURE OF BOTH OF THE TABLES ARE BELOW.
MASTER ONE
SQL> DESC INCIDENT
Name
REF_NO
INC_TYPE_CODE
DISTRICT_CODE
KV33
KV11
INC_DATE
EMERGENCY
TRIP
CAUSE_TYPE_CODE
SUB_CAUSE
INC_DESC
REASON
OPER_SEQ
REM_RECOM
CON_COMP_CODE
CTRL_ENG_APP
DELAY_OCCURED
DELAY_REASON
SECOND MASTER
SQL> DESC SWITCHING
Name
REF_NO
INC_TYPE_CODE
JOB_CODE
DISTRICT_CODE
KV33
KV11
CON_COMP_CODE
INC_DATE
INT_NOTICE_ISSUE
INTERRUPTION
REM_RECOM
CTRL_ENG_APP
WORK_DESC
DETAIL TABLE
SQL> DESC INTERP_DETAIL
Name
REF_NO
INC_TYPE_CODE
FEEDER_CODE
VOL_LEVEL
START_DT_TIME
GRID_CODE
END_DT_TIME
LOAD_AMP
LOAD_MW
LOSS_MWHR
THANKS IN ADVANCE.
KHAWARHi,
When you establish the relations using the references, then oracle will look for the parent key in both the parent tables. Either you need to remove the foreign keys or change your db design to add one more table and have one-one parent child relationships.
HTH
Regards,
Badri. -
Fill combo box fro database using jsf
dear all,
i am new to JSF and i want to fill a JSF combo box from a database
can anyone help me ??
thanks in advance for helpuse this tag inside <h:selectCombobox>
<f:selectItems value="#{myBean.valueArrayFromDB}"/> -
What is the prerequisite for creating two hierarchies from one fact table i
Hi,
what is the prerequisite for creating two hierarchies from one a single fact table.
Rgds,
Amitcreate global temporary table t1 as select * from trn_ordbase on commit preserve rows;You CANNOT use this syntax.
http://download-east.oracle.com/docs/cd/B19188_01/doc/B15917/sqcmd.htm
http://download-east.oracle.com/docs/cd/B19188_01/doc/B15917/glob_tab.gif
http://download-east.oracle.com/docs/cd/B19188_01/doc/B15917/cre_tabl.gif
Maybe you are looking for
-
Hi All: Im having a problem with the find command in Bridge. Basically it cant seem to find anything. It cant even find a file in a folder that Im looking at with Bridge. No mater what search criteria I select Bridge reports that there is nothing to
-
MacBook Pro started running slow
Hi. My mac started to work slowly yesterday. Mac info: MBP Mid 2012, OS X 10.9.2, 16Gb RAM, 500Gb (118Gb free) HDD It both boots slowly, and have frequent short freezes (either short lag for the active program or longer full-system lag with spinning
-
SRM User Settings in SRM 7 for Operational role
Hi! If I assign role /SAPSRM/OP_PURCHASER to a user in SRM (with Operational Purchaser portal role), I could not find the SRM User Settings function. If I use role /SAPSRM/EMPLOYEE (with Employee Self-Service portal role), the function appears under
-
Hello, I have two code. One receive and execute command (the user doesn't touch this one) where many loops are running in a big while loop. The other write command and if I want to abort the execution I push the buttom abort. How can I return to the
-
I can no longer connect to apple tv or my airplay device. The option in settings to allow access to airplay devices is also missing. Does this have a fix? I have a Macbook OS X 10.9.4 (13E28)