Posts [ 2 ]

Topic: ajax related question , i don't know how can i do that

hello everyoneThere is something i want to do but i don't know how can i do that, what do i want to do is:select_tag with some countries , and when you choose any country from select , it loads cities belongs to that country beneath the select_tag in the same page without submit buttons, can anyone told me how can i do that pleaseThanks

Once you have this working, you'll need to arrange for an HTML element with an id of 'my_city_pulldown', and it should initially be styled display:none, like this

<div id="my_city_pulldown" style="display:none">
</div>

When the AJAX is called, it with will stick whatever get_cities renders into that div, and if the AJAX call is successful, that div will get displayed. You'll have a crude little pop-menu. You'll have to muck around with css to get it positioned where you want it.

Good luck!

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.