Combo Box question on JSP
I have two combo boxes. Box 2 is populated dependant on the value of box 1.
The data wil be coming out of a JavaBean with a connection to a database.
What would be the best way to acheive this?
TIA
Owen Thomas
Hello Russ9754!
Might be abit late, but I just read this thread.
Anyway...I think I have what you are looking for.
This code creates a dropdown box with the alternatives of your choice. If none of the options is good enough for the user, he/she can choose "other" and enter a more suitable choice in a pop-up javascriptprompt.
<FORM NAME="formName">
<SELECT NAME="country" onChange="countryOnChange();">
<OPTION VALUE="Albania" selected>- = Albania = -</OPTION>
<OPTION VALUE="Finland">- = Finland = -</OPTION>
<OPTION VALUE="USA">- = USA = -</OPTION>
<OPTION VALUE="Other"> Other... </
OPTION>
</SELECT>
</FORM>
<SCRIPT>
function countryOnChange(){
sel = document.formName.country.selectedIndex;
val = document.formName.country.options[sel].
value;
len = document.formName.country.length;
if (val == "Other"){
var newcountry = prompt("Enter your country.", "");
if (newcountry == null) { return; }
document.formName.country.options[sel].text = newcountry;
document.formName.country.options[sel].value = newcountry;
document.formName.country.length = len +1;
document.formName.country.options[len].text = "Other...";
document.formName.country.options[len].value = "Other";
</SCRIPT>
Similar Messages
-
How can I make a combo box have the ability to add new items in its list? I have an existing combo box that gets its value from an SQL query. How can I let users have the ability to add to that list? If this is not possible with JSP combo boxes, any suggestions as to what field I may use? Thanks
Hello Russ9754!
Might be abit late, but I just read this thread.
Anyway...I think I have what you are looking for.
This code creates a dropdown box with the alternatives of your choice. If none of the options is good enough for the user, he/she can choose "other" and enter a more suitable choice in a pop-up javascriptprompt.
<FORM NAME="formName">
<SELECT NAME="country" onChange="countryOnChange();">
<OPTION VALUE="Albania" selected>- = Albania = -</OPTION>
<OPTION VALUE="Finland">- = Finland = -</OPTION>
<OPTION VALUE="USA">- = USA = -</OPTION>
<OPTION VALUE="Other"> Other... </
OPTION>
</SELECT>
</FORM>
<SCRIPT>
function countryOnChange(){
sel = document.formName.country.selectedIndex;
val = document.formName.country.options[sel].
value;
len = document.formName.country.length;
if (val == "Other"){
var newcountry = prompt("Enter your country.", "");
if (newcountry == null) { return; }
document.formName.country.options[sel].text = newcountry;
document.formName.country.options[sel].value = newcountry;
document.formName.country.length = len +1;
document.formName.country.options[len].text = "Other...";
document.formName.country.options[len].value = "Other";
</SCRIPT> -
How to reduce the weight of a combo box in a jsp
hi friends,
i have developed a jsp form in which i have placed some combo box and i am using ajax concept for loading the details for a field just above the combo box.
my problem is that when the ajax loads the records in the form it comes above the combo box .there,the combo box is coming above the ajax listings and hides the records displayed by ajax.can anybody help me to solve this problem of combo box.<td class="label">Cash bank general</td><td>
<html:select property="accledgeractionform.ledgercbg" styleId="cmbcbg" styleClass="inputbox" style=" width : 130px" tabindex="14" onfocus="setStatusMessage('Select cash bank general')" >
<html:option value="" styleId="cmbCashBankGeneral">
</html:option>
<html:option value="C">Cash</html:option>
<html:option value="B">Bank</html:option>
<html:option value="G">General</html:option>
like this i have created the combo box.
but it is displayed above the results displayed by the ajax.
i thought that since combo box is a heavy weight component its weight must be reduced.help me about that -
I generate an HTML page with a Servlet and I have a combo box that lists numbers 1-20. Depending on a parameter that is passed to the servlet I want to set the Combo box to be initalized to (display) a certain number.
Does anybody know how I can do that? (I would prefer to have the Combo Box entries remain in order)
Thanks,
AndrewYou can always put something in there like
int foo = Integer.parseInt(request.getParameter("foo"));
for(int i=1; i <= 20; i++)
out.println("<option value=\""+i+"\" "+(foo==i)?"SELECTED":"" +" >"+i+"</OPTION>");
} -
I have Flash MX 2004 Pro. I want to create a
movie/graphic/button ( not sure which one yet) of a county
(obviously from a state map) and I want to have all of the counties
(over 40) listed in a Combo Box. I would like the Combo box to
automatically be updated/populated every time I create a
movie/graphic/button of a county. I would like to be able to click
on a county name in the combo box and have the county highlighted.
While the graphic part is doable, I am asking for help with the
scripts.
One more thing: I have a text box that I want to have data
displayed only for the specific county. So I am thinking of
creating a text box that is invisible in the State swf but will be
viewable when the county is selected (mouse over or thru the combo
box). Do I have to use the scripts to make it viewable when the
movie is selected?
Is this even possible with my version of Flash and if so,
does anyone have some codes I can look at?
Thanks.As far as the text goes, there are several ways to do that.
Simplest way is to make the text visible when rolled over and
invisible when rolled out. That way you get the text positioned and
formated the way you want. It isn't the best method in terms of
maintenance. A better method is have one text clip that you can
position in relation to the (x,y) coordinates of the highlighted
county and pull the text for the county from an array. The latter
requires more script but is easier to go back and change since all
you do is update an array.
I just noticed a line in the onRollOut
this[this._parent._name + "menu"].selectedIndex = 0;
that will serve you no purpose whatsoever. I missed deleting
that from the script I modified to post to you. It doesn't hurt
anything since it targets nothing you have -
Hi! I'm new to Adobe Acrobat pro, so forgive me if I ask dumm questions!
So I wanted to make a form with multiple comboboxes which are referring to each other, so that if you choose something from the first one, you can only choose from the subtypes of the chosen type......
Is it even possible?
I attached an exaple in Openoffice. It works with the database fields and hlookup function, but it would be the best to have it in pdf......
Thanks in advanceIt's possible in Acrobat as well, but you will need to have some custom
scripts to do it. -
Combo box question - can a store extra values?
my data is
car# id
CAR1 111111
CAR2 222222
CAR5 555555
i want to be able to select CAR1 in the combo and
retrieve the id field.
what is the best way to do this? in foxpro one can
have hidden fields and some ocxs of cargo objects.
thanks for any help
owen brandonHi,
I haven't used JComboBox for a while but I think you just need to make a class with an id (eg. 11111) and a name (eg. CAR1), and specify a toString method that returns the name. I fyou catch the object you then can cast it and call its getID() method.
Greets
Puce -
Trying to trigger a servlet from .jsp page on combo box change
I have a jsp page with two combo boxes ( single select ).
Here's a snippet from the jsp page containing the code for the two combo boxes:
<form name="frmCountry" id="frmCountry" method="POST">
<select name="selCountry" id="selCountry">
<jsp:include page="/country" />
</select>
</form>
<form name="frmCity" id="frmCity" method="POST">
<select name="selCity" id="selCity">
<jsp:include page="/city" />
</select>
</form>
"country" and "city" are both mapped to servlets in the web.xml file
The country servlet successfully connects to the database and retrieves all countries
and populates the country combo box.
However, the populating of the city combo box depends on what country
is selected in the country combo box;
Here is a snippet of my code from the City servlet:
ResultSet rs;
rs = statement.executeQuery("SELECT City.countryID, City.id, City.name " +
"FROM City " +
"WHERE City.countryID = ( Country id ) " +
"ORDER BY City.name");
Where ( Country id ) has to be somehow retrieved from the Country combo box
on the jsp page. Country id is actually the "value" property of each <option> in the
Country combo box. i.e.:
<option value="5">Portugal</option>
If it's not possible to retrieve the value property from the option,
I could always just use the Country name
So to reiterate, I need the City servlet to be called into action
any time a different country is selected in the country combo box.
I'm a newbie to jsp & servlets, so any suggestions much appreciated.
Edited by: Irish_Fred on Jan 20, 2010 4:29 AMCheers, I came up with a solution using Ajax, where I didn't have to change
anything in my servlets and only had to make minor changes to my jsp page.
I didn't want to use any javascript in my web app, but I guess Ajax
has addressed the issue of cross platform independence. -
Problem in populating 2nd combo box depending upon the selection of 1st
Hi all,
I have 2 combo boxes on my jsp page ,say continent and country . obviously the data in 2nd box is dependant on selection made in the 1st . I'm using MySQL with tomcat 5.0.7 . and JSP.
The first combo box in one form and the 2nd in another. After submitting first i 'm populating the second combo also.
But the problem is after submitting the first form the page gets refreshing and i can't see the selected continent in the first combo box.
The javascript code used follows:
function callCapture(form)
var item = continent.cmbContinent.selectedIndex;
document.country.hidContId.value=continent.cmbContinent.options[item].value;
document.continent.action="country.jsp?hidContId="+document.country.hidContId.value+"&buttName="+document.country.buttName.value+"";
document.continent.target="_self";
document.continent.submit();
some one pls help me asap !Hi Reegz,
that's what i'm also doing and i'm successfull till populating the second combo box but how do I keep the previous inputs on the page and reload the page based on the change of a selection box?
Is their any mistake in the javascript code:
Here is the code:
function callCapture(form)
var item = continent.cmbContinent.selectedIndex;
document.country.hidContId.value=continent.cmbContinent.options[item].value;
document.continent.action="country.jsp?hidContId="+document.country.hidContId.value+"&buttName="+document.country.buttName.value+"";
document.continent.target="_self";
document.continent.submit();
Pls help me... -
I have a combo box defined in JSP.
So when I submit the page with multiple values selected in thsi combo box, I get "argument type mismatch exception" for the setter method defined in actionForm for this combo box. This method has a return type "Collection". Where do you think I am going wrong? What should be the return type here? I had String before but with I could get only the one value from the combo box
(i.e first selected value).Yeah I got it, thanks. But why does it not take any other collections like Arraylist etc??
-
Combo box in jsp : implemented by struts tiles
Hi,
I have few problems with JSP...
we have devided the body part in the tiles into two parts
initially..................
body1: jsp with combo box
body2: a blank jsp
if the user selects an option from the combo box..in onchange function ..iam getting the value of the selected option..and iam doing form.action="action selected by user" ... so that it will go the struts-config then inturn will call the action then by forwarding success..will go to the struts-config file again ..then by have name="seccess".. it will call path="somedefinition"....this definition is defined in the tiles-definition file...
where again...extending some standard definition by overriding ..
body1:jsp with combo box
body2:jsp related to the selected option..in the combo box
second time.. in body1: again we r calling original jsp na..it will show default select only na??
so how to get the selected option and how i can give that option as selected when it is loading second time.
Hope you got my problem...
Please help me out...
Waiting for ur kind reply
Thanks & Regards
Kranti Kiran Kumar Parisa
Software Engineer [ e-Biz ]
[email protected]It's not nice to highjack someone elses thread. I posted a reply http://forum.java.sun.com/thread.jsp?forum=45&thread=552915 (though I shouldn't have, shoulda done it here). if you have questions post them to this thread instead. Leave the other one to the OP's question.
-
How can we pass selected combo box value to a jsp pag?
Hi All,
I want to pass selected combo box value to a same jsp page's variable.
i am using javascript
<select onchange="this.options[this.selectedIndex].text">
</select>
this selected value should be invoked for a jsp page's variable.
Excepting for favorable reply
Vanshselect2.jsp
<script>
function x()
alert(document.f.s.options[document.f.s.selectedIndex].text);
document.f.submit();
</script>
<body>
<form method="get" name="f" action="select2.jsp">
<select name="s" onchange="x()">
<option checked>--select--</option>
<option value="1"> vijay </option>
<option value="2"> kumar </option>
</select>
</form>
</body> -
Hi,
I am a student and working on a class project. In my application at some point, I need to provide a combo box where user can select multiple values and those values should automatically be printed in a text area provided below the combo box. Is this possible?The Only Way By which U can achieve this is by a scripting languages like javascript,vbscript......
Nvr By JSP(Is nothing but a servlet under execution @ background of webserver) as it is meant for Server Side Programming Surely not for Client Side Dynamic Action.
Make use of <select> with multiple property set to true....
and then.... append selected values in the second textbox.
You may go throgh the code given below
c whether that can help u out.....
CLIENT.JSP
=========
<%@ page language="JAVA">
<html>
<head>
<script>
function change(){
var x=document.getElementById("mySelect")
document.getElementById("result").value = ""
for(var i=0;i < x.length;i++){
if(x.options.selected == true)
document.getElementById("result").value = document.getElementById("result").value + " "+x.options[i].value
</script>
</head>
<body>
<select id="mySelect" size="4" multiple onchange="change()">
<option value='Apple'>Apple</option>
<option value='Pear'>Pear</option>
<option value='Banana'>Banana</option>
<option value='Orange'>Orange</option>
</select>
<input type='text' value='' size='10' name='result' id="result">
</body>
</html>
REGARDS,
RaHuL -
How to populate the combo boxes that are created dynamically in jsp
Hi,
I am using JSP.
I am creating combo boxes dynamically (based on the num selected by the user). These dynamically created combo boxes need to have A-Z as options (each box) . Now, when the user chooses the option A in any of the combo-boxes,the rest should not have this option. so on..
how do i achieve this.Kindly help.You'll need to use JavaScript...I have a complicated example and a simple example, however, I cannot really understand the complex example but I know how it works. The looping is too complex for me.
First you'll need to populate a server side variable...depending on how often the data is updated you may want this to run each time a new session is created...this example is run each time Tomcat is started and the application context is initialized:
package kms.web;
// Servlet imports
import javax.servlet.ServletContextListener;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContext;
// utility imports
import java.util.Map;
// domain imports
import kms.domain.LocationService;
import kms.domain.DeptService;
import kms.domain.PatentService;
* This listenter is used to initialize
* the Maps of Locations, Patents & Depts used to populate
* pulldown lists in JSPs
public class InitializeData implements ServletContextListener {
* This method creates the Maps.
public void contextInitialized(ServletContextEvent sce) {
ServletContext context = sce.getServletContext();
LocationService lServ = new LocationService();
// Create the Maps
Map campuses = lServ.getCampuses();
Map buildings = lServ.getBuildings();
Map floors = lServ.getFloors();
Map locs = lServ.getLocations();
// And store them in the "context" (application) scope
context.setAttribute("campuses", campuses);
context.setAttribute("buildings", buildings);
context.setAttribute("floors", floors);
context.setAttribute("locs", locs);
DeptService dServ = new DeptService();
Map depts = dServ.getDepts();
context.setAttribute("depts", depts);
PatentService pServ = new PatentService();
Map patents = pServ.getPatents();
context.setAttribute("patents", patents);
//I did this one myself
/* CodeService cServ = new CodeService();
Map masterMks = cServ.getCodes();
context.setAttribute("masterMks", masterMks);
* This method is necessary for interface.
public void contextDestroyed(ServletContextEvent sce) {
// I have no clue what the heck this is for???
// Let me know if you do!
}So now we travel into the PatentService method called 'getPatents();' which in turn calls a PatentDAO method
Map patents = pServ.getPatents();
Below is the code for the PatentService object:
package kms.domain;
import kms.util.ObjectNotFoundException;
import java.util.*;
* This object performs a variety of dept services, like retrieving
* a dept object from the database, or creating a new dept object.
public class PatentService {
* The internal Data Access Object used for database CRUD operations.
private PatentDAO patentDAO;
* This constructor creates a Dept Service object.
public PatentService() {
patentDAO = new PatentDAO();
public Map getPatents() {
Map patents = null;
try {
patents = patentDAO.retrieveAll();
// If the dept object does not exist, simply return null
} catch (ObjectNotFoundException onfe) {
patents = null;
return patents;
}It may be useful for you to see the code of the Patent class:
package kms.domain;
/*** This domain object represents a dept.
public class Patent implements java.io.Serializable {
private int codeGgm;
private String name = "";
private String description = "";
private int creator;
private String creationDate = "";
private int used;
* This is the full constructor.
public Patent(int codeGgm, String name, String desc, int creator, String creationDate, int used) {
this.codeGgm = codeGgm;
this.name = name;
this.description = desc;
this.creator = creator;
this.creationDate = creationDate;
this.used = used;
public Patent() { }
public int getCodeGgm() {
return codeGgm;
public void setCodeGgm(int codeGgm) {
this.codeGgm = codeGgm;
public String getName() {
return name;
public void setName(String name) {
this.name = name;
public String getDesc() {
return description;
public void setDesc(String desc) {
this.description = desc;
public int getCreator() {
return creator;
public void setCreator(int creator) {
this.creator = creator;
public String getCreationDate() {
return creationDate;
public void setCreationDate(String creationDate) {
this.creationDate = creationDate;
public int getUsed() {
return used;
public void setUsed(int used){
this.used = used;
}And here is the Database table which stores the Patents:
DESC PATENT:
CODE_GGM NUMBER(3)
NAME VARCHAR2(15)
DESCRIPTION VARCHAR2(250)
CREATOR NUMBER(10)
CREATION_DATE DATE
USED NUMBER(1)
So, we then travel into the code of the PatentDAO to see how the DAO object executes the DB query to get all of the Data we need for the select list:
package kms.domain;
import javax.naming.*;
import javax.sql.*;
import java.util.*;
import java.sql.*;
import kms.util.*;
* This Data Access Object performs database operations on Patent objects.
class PatentDAO {
* This constructor creates a Patent DAO object.
* Keep this package-private, so no other classes have access
PatentDAO() {
* This method returns a Map of all the Dept names
* The key is the Dept id
Map retrieveAll()
throws ObjectNotFoundException {
Connection connection = null;
ResultSet results = null;
// Create the query statement
PreparedStatement query_stmt = null;
try {
// Get a database connection
Context initContext = new InitialContext();
DataSource ds = (DataSource)initContext.lookup("java:/comp/env/jdbc/keymanOracle");
connection = ds.getConnection();
// Create SQL SELECT statement
query_stmt = connection.prepareStatement(RETRIEVE_ALL_NAMES);
results = query_stmt.executeQuery();
int num_of_rows = 0;
Map patents = new TreeMap();
// Iterator over the query results
while ( results.next() ) {
patents.put(new Integer(results.getInt("code_ggm")), results.getString("name"));
if ( patents != null ) {
return patents;
} else {
throw new ObjectNotFoundException("patent");
// Handle any SQL errors
} catch (SQLException se) {
se.printStackTrace();
throw new RuntimeException("A database error occured. " + se.getMessage());
} catch (NamingException se) {
throw new RuntimeException("A JNDI error occured. " + se.getMessage());
// Clean up JDBC resources
} finally {
if ( results != null ) {
try { results.close(); }
catch (SQLException se) { se.printStackTrace(System.err); }
if ( query_stmt != null ) {
try { query_stmt.close(); }
catch (SQLException se) { se.printStackTrace(System.err); }
if ( connection != null ) {
try { connection.close(); }
catch (Exception e) { e.printStackTrace(System.err); }
private static final String RETRIEVE_ALL_NAMES
= "SELECT code_ggm, name FROM patent ";
}Now when you wish to use the 'combo box' (also called select lists), you insert this code into your jsp:
<TR>
<%@ include file="../incl/patent.jsp" %>
</TR>
depending on how your files on your server are organized, the "../incl/patent.jsp"
tells the container to look up one directory from where the main jsp is to find the 'patent.jsp' file in the 'incl' directory.
I need some help creating multi-level select lists with JavaScript:
Can anyone explain this code:
<%@ page import="java.util.*,kms.domain.*" %>
<jsp:useBean id="campuses" scope="application" class="java.util.Map" />
<TR><TD ALIGN='right'>Campus: </TD>
<TD>
<select name="campus" size="1" onChange="redirect(this.options.selectedIndex)">
<option value="0" selected>No Campus</option>
<% LocationService ls = new LocationService();
Iterator c = campuses.keySet().iterator();
Map[] bm = new Map[campuses.size()];
Map[][] fm = new Map[campuses.size()][0];
Map[][][] lm = new Map[campuses.size()][0][0];
int i2 = 0;
int j2 = 0;
int k2 = 0;
int jj = 0;
int kk = 0;
while (c.hasNext()) {
Integer i = (Integer)c.next();
out.print("<OPTION ");
out.print("VALUE='" + i.intValue()+ "'>");
out.print( (String) campuses.get(i) );
out.print("</OPTION>");
bm[i2] = ls.getBuildingsByCampus(i.intValue());
fm[i2] = new Map[bm[i2].size()];
lm[i2] = new Map[bm[i2].size()][];
Iterator b = bm[i2].keySet().iterator();
j2 = 0;
while (b.hasNext()) {
Integer j = (Integer)b.next();
fm[i2][j2] = ls.getFloorsByBuilding(j.intValue());
lm[i2][j2] = new Map[fm[i2][j2].size()];
Iterator f = fm[i2][j2].keySet().iterator();
k2 = 0;
while (f.hasNext()) {
Integer k = (Integer)f.next();
lm[i2][j2][k2] = ls.getLocationsByFloor(k.intValue());
k2++;
kk++;
j2++;
jj++;
i2++;
} %>
</select></TD>
</TR>
<TR><TD ALIGN='right'>Building: </TD>
<TD>
<select name="building" size="1" onChange="redirect1(this.options.selectedIndex)">
<option value="0" selected>No Building</option>
</select></TD>
</TR>
<TR><TD ALIGN='right'>Floor: </TD>
<TD>
<select name="floor" size="1" onChange="redirect2(this.options.selectedIndex)">
<option value="0" selected>No Floor</option>
</select></TD>
</TR>
<TR><TD ALIGN='right'>Room: </TD>
<TD>
<select name="location_id" size="1">
<option value="0" selected>No Room</option>
</select></TD>
</TR>
<script>
var cNum = <%=i2%>
var bNum = <%=jj%>
var fNum = <%=kk%>
var cc = 0
var bb = 0
var ff = 0
var temp=document.isc.building
function redirect(x){
cc = x
for (m=temp.options.length-1;m>0;m--)
temp.options[m]=null
temp.options[0]=new Option("No Building", "0")
if (cc!=0) {
for (i=1;i<=group[cc-1].length;i++){
temp.options=new Option(group[cc-1][i-1].text,group[cc-1][i-1].value)
temp.options[0].selected=true
redirect1(0)
var group=new Array(cNum)
for (i=0; i<cNum; i++) {
group[i]=new Array()
<% for (int i=0; i< bm.length; i++) {
Iterator bldgs = bm[i].keySet().iterator();
int j = 0;
while (bldgs.hasNext()) {
Integer intJ =(Integer) bldgs.next(); %>
group[<%=i%>][<%=j%>] = new Option("<%=bm[i].get(intJ)%>", "<%=intJ%>");
<% j++;
} %>
var group2=new Array(cNum)
for (i=0; i<cNum; i++) {
group2[i] = new Array()
for (j=0; j<=bNum; j++) {
group2[i][j] = new Array()
<% for (int i=0; i< fm.length; i++) {
for (int j=0; j< fm[i].length; j++) {
Iterator flrs = fm[i][j].keySet().iterator();
int k = 0;
while (flrs.hasNext()) {
Integer intK =(Integer) flrs.next(); %>
group2[<%=i%>][<%=j%>][<%=k%>] = new Option("<%=fm[i][j].get(intK)%>", "<%=intK%>");
<% k++;
} %>
var temp1=document.isc.floor
var camp=document.isc.campus.options.selectedIndex
function redirect1(x){
bb = x
for (m=temp1.options.length-1;m>0;m--)
temp1.options[m]=null
temp1.options[0]=new Option("No Floor", "0")
if (cc!=0 && bb!=0) {
for (i=1;i<=group2[cc-1][bb-1].length;i++){
temp1.options[i]=new Option(group2[cc-1][bb-1][i-1].text,group2[cc-1][bb-1][i-1].value)
temp1.options[0].selected=true
redirect2(0)
var group3=new Array(cNum)
for (i=0; i<cNum; i++) {
group3[i] = new Array()
for (j=0; j<=bNum; j++) {
group3[i][j] = new Array()
for (k=0; k<=fNum; k++) {
group3[i][j][k] = new Array()
<% for (int i=0; i< lm.length; i++) {
for (int j=0; j< lm[i].length; j++) {
for (int k=0; k< lm[i][j].length; k++) {
Iterator locs = lm[i][j][k].keySet().iterator();
int m = 0;
while (locs.hasNext()) {
Integer intM =(Integer) locs.next(); %>
group3[<%=i%>][<%=j%>][<%=k%>][<%=m%>] = new Option("<%=lm[i][j][k].get(intM)%>", "<%=intM%>");
<% m++;
} %>
var temp2=document.isc.location_id
function redirect2(x){
ff = x
for (m=temp2.options.length-1;m>0;m--)
temp2.options[m]=null
temp2.options[0]=new Option("No Room", "0")
if (cc!=0 && bb!=0 && ff!=0) {
for (i=1;i<=group3[cc-1][bb-1][ff-1].length;i++){
temp2.options[i]=new Option(group3[cc-1][bb-1][ff-1][i-1].text,group3[cc-1][bb-1][ff-1][i-1].value)
temp2.options[0].selected=true
</script>
This produces a related select list with 4 related lists by outputting JavaScript to the page being served. It works the same way as the first example that I describe but I don't understand the looping...maybe someone could explain how to go from the single select list to a double and/or triple level drill down? -
Problem regarding Combo boxes in JSP
Hi all,
I have two combo boxes on jsp page, i want to fill the second CB by value of first CB, and both CBs have values from Database, i tried it many times but cant got solution
plz help me its very urgent and if possible provide code plz
thankshttp://forum.java.sun.com/thread.jspa?threadID=597553
Maybe you are looking for
-
Why am I being charged for CC?
Adobe charged my debit card 49.99 for a monthly CC payment, but I did not enroll in the program. I had enrolled for the one year CC trial at 29.99, but canceled after the trial period. I did, however enroll in the Photoshop Photography, Lightroom, Be
-
Java Stack Vs Dual Stack in Pi 7.3
Hi experts. I open this thread because I'd like to know your opinion about the newJava installation option in SAP PI 7.3. In previous realeses (7.0,7.1) I felt more comfortable and safe in abap stack and I'm a little afraid about working only with ja
-
VOIP over broadband - with QoS?
At the moment we use Cisco 2600 routers with 256k BT kilostream connections to our stations, to provide IT and Cisco VOIP. The kilostream connections cost about ?5k/station/year. We want to stream video for the IT, but the kilostream isn't up to it.
-
HI all, when saved shipment cost document I cannot find service PO in reference tab.Why service PO is not created.Did I missed any settings (Service vendor exists)any helps?
-
Adobe releases 64bit Flash player 10 Alpha
Furthering Adobe's commitment to the Linux community and as part of ongoing efforts to ensure the cross-platform compatibility of Flash Player, an alpha version of 64-bit Adobe Flash Player 10 for Linux operating systems was released on 11/17/2008 an