Click to See Complete Forum and Search --> : Dynamic dropdown menu (Country Chooser)


komlos
03-24-2003, 03:28 AM
Hi,

I'm using http://javascript.internet.com/forms/country.html form which populates second dropdown based on the selection in the first one. It is neat because it also works in Netscape.

However I'd like to customise it because in the arrays it uses text as values and I like to use text as well as values in these arrays. As values I'd like to use numbers.
Something like:

var namericaArray = new Array("('Select country','',true,true)",
"('1,Canada')", "('2,USA')", "('3,Other')");

How can I do this by customising this script?
Any help would be appreciated.

khalidali63
03-24-2003, 07:56 AM
you might want to take a look at this link..

http://68.145.35.86/skills/javascripts/MultipleListBoxResult3rdListBox.html

Cheers

Khaid

komlos
03-24-2003, 08:17 AM
Thanks but it didn't help me. I'm not a JS programmer. I'd like to have the 'country chooser' modified. What row should I add and where?

thanks

khalidali63
03-24-2003, 08:24 AM
explain your question a bit more( what kind of modification you want ) to that script.

Khalid

komlos
03-24-2003, 10:10 AM
1. I'd like to use this script for my categories and subcategories. In the first dropdown there would be the categories and the second would be the subcategories.

The original script has country names as values in its arrays. In order for this script to be compatible with my exisiting system I'd like to use the id# of the categories as VALUEs and the category names as the text name to display in the dropdowns.
Like: <option value="1">Canada</otion>

So I suppose something like this instead of the original:

var namericaArray = new Array("('Select country','',true,true)",
"('1,Canada')", "('2,USA')", "('3,Other')");

2. My second problem is that it doesn't work in NETSCAPE 4.7 if you are inside the member area. It reloads the page every time, and it doesn't let you select an option. The same page works fine outside the area without member verification. What could be the problem?

This is outside the member area:
http://www.mnyknt.hu/classified/post.php

This is inside:
http://www.mnyknt.hu/classified/members/post.php
(use email: java@script.com pass: script)

Thanks for your help

Dickson
02-06-2005, 08:07 PM
Hi guys.

I need the "Country Chooser" in my site, but I am a javascript
beginner, so... is not lacking a go button on that script?

Well, I choose a region, then a country and so what? Where (how!)
I go to a new page, depending on my choice?

Can you help me? What line code is missing in the script to make it
realy works?

Thanks in advance!
Dickson.

PSLoh
02-06-2005, 08:19 PM
Pardon me...But i don't believe any of us out here understand wat u trying to ask in there...

Dickson
02-07-2005, 08:38 PM
Ok, let me explain better...

There is the "Country Chooser" javascript, right?
We can choose a region, and then the second menu changes appropriately, allowing us to choose a country.

But after those choices what we have to do for the script
take us the some other page? Do you understand?

The script is nice, but how to make it really works?
After all, we chose the region and the country and thatīs all.
Which the usefulness of this script if I cannot go the some
page after the choices that I did?

Thanks for helping me - and sorry for my bad english...

PSLoh
02-10-2005, 06:08 PM
well...u can submit the country to another page using forms...or a button to run another javascript command...its ur choice...

Dickson
02-11-2005, 09:35 PM
Please - can you explain how to do this?
As I said in my first message, I do not know much javascript...

Thanks.