×

Notice

The forum is in read only mode.

default country selection when loading page

14 years 10 months ago #386 by Martin Dave
there is a line in \\components\\com_jsjobs\\views\\jobposting\\tmpl\\formjob.php:

//window.onLoad=dochange(\'country\',-1);
// value in first dropdown

base on the comment above, this line should load the country drop-down menu with a default value. it was commented out in the code. I uncommented it and placed the country id for Pakistan(for instance), 80, into the function call like the following:


window.onLoad=dochange(\'country\',80);
// value in first dropdown

however, it does not seem to work. when I load the page, the country pakistan is still not selected as the default value for the country drop down. I noticed the same code appeared in a couple of other pages..

what am I doing wrong? how can I get this to work..I have already populated the database with the sql in US_PAK_UAE_states_countiies_cities.sql

thanks a lot for your reponse and help. I also would like to thank the developer for this fantastic component. great work!
14 years 10 months ago #387 by Martin Dave
btw, I forgot to mention: although the initial country code value doesnot get selected even with the line(window.onLoad=dochange(\'country\', 80); // value in first dropdown) uncommented, the state drop-down menu still gets populated when a country is selected. in other words, the AJAX code for populated country and state selection drop-down menu still work fine..it is just that I could not make a default value for the country select menu and hence the default state drop-down menu...
14 years 10 months ago #396 by Ahmad
Do not change the AJAX.

I replay to your other message.

Please write your valuable review JS Jobs and JS Support Ticket at JED.
14 years 9 months ago #419 by Martin Dave
Thanks for your help.

changing the line indeed made PK the default value for country selection drop-down menu. However, the state is not populated as a drop-down menu with all the state names. ideally, since the country was defauted to PK, the states should appear as drop-down menu instead of input box. In order to make all the PK states appear in the drop-down menu, I have to choose the country code again, which kind of beating the purpose of having a default country selected.

what else can we change to make this work?
14 years 9 months ago #426 by Ahmad
I\'ll try to add default country into configuration.

Please wait next release.

Please write your valuable review JS Jobs and JS Support Ticket at JED.
14 years 9 months ago #435 by MaRkSMaN
Martin Dave wrote:

Thanks for your help.

changing the line indeed made PK the default value for country selection drop-down menu....


Please tell me exactly which line(s) you changed to get the default country when page loads.
Time to create page: 0.820 seconds

Please publish modules in offcanvas position.