News:

Support the VirtueMart project and become a member

Main Menu

Use of AJAX in Address Forms

Started by Xethron, February 06, 2014, 14:23:58 PM

Previous topic - Next topic

Xethron

Hello Virtuemart!

I'm writing a shipping module for Virtuemart for MDS Collivery for South Africa.

Now when you select a Country, it will load and populate "State / Province / Region". But I need to take it one step further so that, if the Country is South Africa, and the "State / Province / Region" changed, it should load and populate all the "Suburbs".

I added a drop down for suburbs, now all I have to do is tell it to get the data from my module when "State / Province / Region" is changed.

I assume there is no default functionality for this, however, how would you go about adding this in? Has someone done it before?

I guess I would have to add my own JS to all the address pages. Can this be done? And if so, how?

Thanks in advance,
Xethron