PDA

Click to See Complete Forum and Search --> : A difficult / interesting / debateable one..........


turfbult
Jan 6th, 2001, 06:24 AM
Hi,

I am busy developing a website where you have to choose a country, state and city to see details according to what you have chosen.

I therefor have basically 3 pages - a country,state and city page. So the 1st page loads, you choose the Country of interest click submit, then the state page loads with all the states of the country just chosen - you choose the state of interest, click submit, then the city page loads with all the cities for the country/state combination selected. After the city page, comes the details screen which shows details according to your search criteria.

Now, this works fine and is fast, but someone suggested that I put the search criteria (Country,State,City) on ONE page so that instead of 3 pages before seeing results it now only has 1 page before seeing the results.

My problem with this is that I need to send the country/state/city thru to the database so that I can then select only the state/city according to what country was selected. IE.... Lets say you chose USA - I need the submit button to send "USA" to my db so that I can now "select state from table where country = 'USA'" and then display it. So even if I do have this on one page it will still take some time to reload the screen with the new info. I have seen a site that works like this and it is actually pretty irritating, because as soon as you click a country the page starts to reload so that the relevant states are now displayed in the dropdown box and as a matter of fact I felt pretty "out of control" using this site.

I'm lost (you too, most probably after this message!!!???).

So, my question is..... what do YOU think of the way I developed my site - 3 clicks before seeing the results, but at least your in control!! OR have everything (the search criteria) on one page, but still "waste" time waiting for the page to reload with new data.

It's a bit of a catch 22, I think - both have their pro's and con's.

If there are any guru's out there that can help me with some other way around this problem, it will be GREATLY appreciated.

By the way, I am using a SQL server db and ASP - I dont know Java/Jscript etc. at all.

Thanks and sorry for the long message....
T.

asabi
Jan 6th, 2001, 11:47 AM
1. you r right, it is long

2. If I understand right, the way with the 3 pages goes to the DB 3 times ... better 1 than 3 ..

3. I don't know about other users, but I don't like going through 3 pages to get through what I need .. people usually quit in the second one ..

4. How do u ask them ? do u have "free text" search, or is it with drop down menu ?


In general, I think that one page is better than 3 ..

turfbult
Jan 7th, 2001, 10:47 AM
Hi Alon,

I use dropdown menus to "ask the user".

Whether you have the dropdowns on one or 3 pages, the db is still hit 3 times - once for each new query. Eg.. when a new COUNTRY is chosen, the db must find all STATES for that COUNTRY, then the STATE is chosen and the db must find all CITIES for that STATE, lastly the CITY is chosen and the db must find all DETAILS for the COUNTRY/STATE/CITY combination. Whether on one or 3 pages - this stays the same!!

Any suggestions on how to better this design of mine - keeping in mind that time is still wasted/used if I put all dropdowns on one page.

Check out this website http://www.successmtgs.com/search/index.html

This is basically what I'm talking about... you have the COUNTRY and STATE dropdowns on one page and when the COUNTRY changes, the page reloads with the STATES for that specific COUNTRY. I dont know - it just makes me feel like I'm not in control of what is happening??

What do you think about it???

Thanks,
T

asabi
Jan 7th, 2001, 11:23 AM
I understand ..

I think that the real question is:

How much time does it take the page to load with ALL the information retrieved in one time, if the DB is not HUGE, it might be better for the user to wait anoher 2 sec and then look at the information freely with no more reloading ..

if the page expires ... that's something else ..

I have a good idea though, you can create an ASP page or a VB program that would CREATE an HTML page from the DB information (with all the information in)..

The user will get to see the HTML version, but since it is from the DB, it is still current and valid ..

All you need to do is to have this page/program run every time the DB is being update / every day / every 10 min or what ever u like (you can make a VB program with a timer)..

The HTML will be much faster to load .., and since it will have all the information in, no refresh is required.

What do u think ?

turfbult
Jan 7th, 2001, 11:55 AM
Now that is not a bad idea!!!!!

I have never thought of it.

The only problem is that there can be many variables - different details for different Countries,States,Cities - different State for different Countries etc. etc. - I'm sure you get the picture, but still, I think it's a brilliant idea!!!!!

Well done and thanks - I'm gonna give it a try.

T

asabi
Jan 7th, 2001, 12:07 PM
cool ! :)

You can do all the if statments for the cases using Javascripts ..

The program that makes the HTML can store all the information in Arrays in Javascript and show it, or you can use layers with diffrent dropdown menus that shows up with the proper information.

Good luck !

turfbult
Jan 8th, 2001, 03:41 AM
Alon,

I've been thinking about your idea the whole weekend and I still think it's good.

My problem however is.... how do I save this page I create using ASP onto my hdd automatically (I also posted a new thread about this, but have not received many replies yet)

To create the page is no problem!!! How do I save it automatically??

Thanks,
T

asabi
Jan 8th, 2001, 09:54 AM
it depends, if you are using a VB program, just look at the tutorials in this site

http://www.vb-world.net/files/openstatement/

If you want to use an ASP page, you need to use the filesystem object.

I have to go in 5 min, so I don't have time to post it now, but I will be back in 8 hours, and I will post some examples..

Alon

asabi
Jan 8th, 2001, 09:56 AM
The principle is to create a text file, but just using the ending for an HTML/HTM file ..

turfbult
Jan 8th, 2001, 01:10 PM
I'm still a bit lost, but will check out the tutorials etc.

thanks,
T

Jan 8th, 2001, 03:24 PM
I done it using dynamic html!! The page has all countries in the following format:
countries="USA:CANADA:UK:SWEEDAN:.........."
States="USA:NY,NJ,GA,.........:CANADA:ST1,ST2"
CITIES="USANY:NEW YORK CITY,......:USANJ:......."
These strings are generated by database itself!
I just split these three variables! when the page loads it splits the variable into an array!!
The on_click event for the countries allows only those states to reload form the string which has that country selected!!
The on_click event for States allows only those cities to reload into the drop_down which has that country and state selected earlier!!
It doesn't take much time to load!!

To know more on this please contact me at mahesh_gokhale@hotmail.com
Thanks
Mahesh