Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Suppose there are 3 combo box.
SELECT COUNTRY
SELECT STATE
SELECT CITY
if i select any country from country conutrylistbox
values in the state will get automatically inserted with
database values>>
THEN on selection of state city will be inserted in city
combo box


If you can help then please Help me...

Answers were Sorted based on User's Feedback



Suppose there are 3 combo box. SELECT COUNTRY SELECT STATE SELECT CITY if i select any country ..

Answer / atul shende

make a database having fields country,state,city

store the information in that i.e list of
country,state,city.

write code on country combobox change index event.
select state from [table] where country='selected country'

store result in dataset or datatable and bind it with state
combo.

same for state combo for seelecting cities of that state.

Is This Answer Correct ?    12 Yes 9 No

Suppose there are 3 combo box. SELECT COUNTRY SELECT STATE SELECT CITY if i select any country ..

Answer / mustkeem

You try this ...script...

<?php
require_once("cities/dao/BaseDao.php");

class CitiesDao extends BaseDao {

public function getCountries() {
$query = "select * from tb_countries order by country asc";
return
$this->execute($this->connection->prepareQuery($query,
Array()));
}

public function getCountryById($idCountry) {
$query = "select * from tb_countries where id_country =
:id_country";
return
$this->getSingleRow($this->connection->prepareQuery($query,
Array("id_country" => $idCountry)));
}

public function getStatesByCountry($idCountry) {
$query = "select * from tb_states where id_country =
:id_country order by state asc";
return
$this->execute($this->connection->prepareQuery($query,
Array("id_country" => $idCountry)));
}

public function getStateById($idState) {
$query = "select * from tb_states where id_state = :id_state";
return
$this->getSingleRow($this->connection->prepareQuery($query,
Array("id_state" => $idState)));
}

public function getCitiesByCountryAndState($idCountry,
$idState) {
$query = "select * from tb_cities where id_country =
:id_country and id_state = :id_state order by city asc";
return
$this->execute($this->connection->prepareQuery($query,
Array("id_country" => $idCountry, "id_state" => $idState)));
}

public function getCityById($idCity) {
$query = "select * from tb_cities where id_city = :id_city";
return
$this->getSingleRow($this->connection->prepareQuery($query,
Array("id_city" => $idCity)));
}
}
?>

Is This Answer Correct ?    7 Yes 9 No

Post New Answer

More Advanced Java Interview Questions

what is stringBuffer and StringBuilder?

3 Answers  


Is the ternary operator written x : y ? Z or x ? Y : z ?

0 Answers  


How can a dead thread be restarted?

1 Answers   IBM, Wipro,


What is mdb and what is the special feature of that?

0 Answers  


What is JNI?

1 Answers   Google, TCS,


Does Java pass arguments by value or reference?

5 Answers   HeadStrong,


If we opened Windows Internet Explorer 4 times, does it starts 4 processes or 4 threads?

0 Answers  


What is chat area? Explain.

0 Answers  


In connection pool,when 100 clients are requesting, in pool 100 objects is there, when another client is making request how it will work

3 Answers  


What is a policy?

0 Answers  


In a multitiered application which tier is the browser in?

10 Answers   Adobe,


What do you need to set-up a cluster with jboss?

0 Answers  


Categories