/    Sign up×
Community /Pin to ProfileBookmark

is it possible?

Hello there,

I’m fairly new to JavaScript, and would like to ask you guys if you think this is possible… if so how much work? maybe some examples?

I have a page with two drop down menus and a button in a form. Changing the option in the first menu calls a script to reload the page… the action part of the form parses an argument to the url in order to query a database with php, and adjust the second menu.

The first menu is countys, second is towns. So if you click an element in countys, towns in that area will show in the second menu.

This works great.

But i have another page which needs this fuctionaility in a different way. The first menu needs to be multiple choice, but still needs to refresh the page in order to update the second menu. However, this should only be done on the first initial click on the first menu… so that you get towns from that first area you click. When you start selecting additional elements it must not refresh, obviously!

I’m not sure if it’s possible, as the refreshing ONCLICK will always get in the way… Do you have any ideas?

If not i can just add a second box underneath to do the job.

Thanks, hope you understand me!
James.

to post a comment
JavaScript

1 Comments(s)

×

Success!

Help @jamesm spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...