Solved

Make Div tags work like frames

Posted on 2011-03-14
2
491 Views
Last Modified: 2012-06-27
I am trying to write an app that gives me the basic functionality of a frame by using divs.

What I would like to do is have an initial drop down to select a major catagory and then in another div, have it display the options for the sub category.

Example
select state
      -> select city in the above state

I only want to see the cities from the above state and to make it even more difficult,  it needs to be dynamic because the cities can change.  This is part of a delivery tracking app.


0
Comment
Question by:ISHUC
2 Comments
 
LVL 8

Accepted Solution

by:
imantas earned 250 total points
ID: 35130007
I think what you need is AJAX. It will let you receive data from the server withouth refreshing the whole page and put it inside any place on the page. There's no other way than JavaScript to update contents of a div. Usually JavaScript frameworks like jQuery have a very friendly interface which makes it very easy to use.

You can find more info here.
0
 
LVL 6

Assisted Solution

by:blueghozt
blueghozt earned 250 total points
ID: 35136443
This example gives you all the code you need for the current city/state relationships http://www.bitrepository.com/dynamic-dependant-dropdown-list-us-states-counties.html

If you want to make the cities dynamic (how often do they really change?) then you will need to subscribe to some sort of web service that maintains all of this information, I don't know of any US ones as I am UK based (we have Royal Mail’s PAF data that is updated regularly) but I am sure they are out there. The above example should get you up and running though.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now