Jump to content

Dropdown menu selct-> load new (tag?)


Mr_J

Recommended Posts

Hi All

Q: Select in the "drop down menu" e.g "COUNTRY" then it have 2 go to "Selected Country" to display e.g CITY Names Bound to the Country. So if I select North AMERICA the page must load the "City list" for N America or if I select England it must load "London" "Dover" etc.

 

Can this be done with tags?

Cheers

Jaco

Link to comment
https://forums.phpfreaks.com/topic/134005-dropdown-menu-selct-load-new-tag/
Share on other sites

It's done with javascript. There are two ways you can do it. You can either load all the possible secondary lists on the page load, hiding them using CSS, then using javascript to make the applicable one appear, or else you can use a technique called Ajax, which is javascript, but what it does is makes a call to the server, gets some data, and then inserts it in the applicable position on the page. This technique is a little more difficult, and takes a little longer as it's not instantaneous, but will prevent you from having to load a lot of unneeded data on the page load.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.