Total members 10262 | Gratitudes |It is currently Thu May 24, 2012 10:13 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 3 posts ] 
Author Question
 Question subject: filling two comboboxes
PostPosted: Sun Sep 11, 2011 1:53 pm 
Offline
Newbie
User avatar

Joined: Sun Sep 11, 2011 1:45 pm
Posts: 2
Has thanked: 0 time
Have thanks: 0 time

i have 2 comboboxes on jsp page.first combobox is been fillin onload and second combobox must be fille by choosing an option from first combobox like :city and countries.
how i can "push" to make the loading data from bean class?


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: filling two comboboxes
PostPosted: Mon Sep 12, 2011 12:48 pm 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2279
Location: Earth
Has thanked: 39 time
Have thanks: 61 time
can you post your code please.

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: filling two comboboxes
PostPosted: Tue Sep 13, 2011 8:47 am 
Offline
Newbie
User avatar

Joined: Sun Sep 11, 2011 1:45 pm
Posts: 2
Has thanked: 0 time
Have thanks: 0 time
<%@page import="shopking.Product"%>
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<html>
<head>
<title>חיפוש מתקדם</title>
<link rel="stylesheet" type="text/css" href="cssFiles\menu.css"/>
<link rel="stylesheet" type="text/css" href="cssFiles\advance_search_page.css"/>
<jsp:useBean id="user" class="shopking.AdvanceSearchClass" scope="page"/>
<%@page import="java.util.ArrayList"%>
<%@page import="shopking.Category"%>

</head>
<body>
<img src="images\web_logos\shopking_logo.png" class="shopking_logo">

<%ArrayList<Category> cc = user.getCategoriesList(); %>

<select name="categoryName" id="categoryName" dir="rtl">
<option value="all">הכל</option>
<% for(int i=0 ;i<cc.size();i++){%>
<option value="<%=cc.get(i).getCategory_Id()%>"><%=cc.get(i).getDescriptionH()%>
</option><%}%></select>:קטגורית חנות

<input type="text" name="FREEtext">:קטגורית מוצרים

<input type="number" id="to" width="3">עד <input type="number" id="from" width="3">מחיר מ


<script>
var categoryP=document.getElementById("categoryName");
categoryP=category.selectedIndex();
var from=document.getElementById(from).valueOf();
var to =document.getElementById(to).value();
<%ArrayList<Product>prodList=user.getProductListByCategory(Integer.parseInt(categoryP), Double.parseDouble(from), Double.parseDouble(to)); %>
<select name="Products" dir="rtl">
<% for(int i=0;i<prodList.size();i++){%>
<option value=<%=i %>><%=prodList.get(i).getProducr_NameH()%></option>
<%}%>
</select>

</script>



</body>
</html>


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 3 posts ] 
Quick reply


  

 Similar topics
 ASP.NET code for filling and displaying a DataGrid

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team