wsd Posted October 21, 2010 Share Posted October 21, 2010 Hi, I was wondering if we could use http://forum.whmcs.com/showthread.php?t=28740&page=3 Are there some that will help it because I can not jQuery. For now the result is displayed as a dropdown box with it has to show as text to be then stored in customfield phonenumbercode Best regards, var artc = new Array(); artc['AF']="+93"; artc['AL']="+355"; artc['DZ']="+213"; artc['AS']="+1684"; artc['AD']="+376"; artc['AO']="+244"; artc['AI']="+1264"; artc['AG']="+1268"; artc['AR']="+54"; artc['AM']="+7"; artc['AW']="+297"; artc['AU']="+61"; artc['AT']="+43"; artc['AZ']="+994"; artc['BS']="+1242"; artc['BH']="+973"; artc['BD']="+880"; artc['BB']="+1246"; artc['BY']="+375"; artc['BE']="+32"; artc['BZ']="+501"; artc['BJ']="+229"; artc['BM']="+1441"; artc['BT']="+975"; artc['BO']="+591"; artc['BA']="+387"; artc['BW']="+267"; artc['BR']="+55"; artc['BN']="+673"; artc['BG']="+359"; artc['BF']="+226"; artc['BI']="+257"; artc['KH']="+855"; artc['CM']="+237"; artc['CA']="+1"; artc['CV']="+238"; artc['KY']="+1345"; artc['CF']="+236"; artc['TD']="+235"; artc['CL']="+56"; artc['CN']="+86"; artc['CO']="+57"; artc['KM']="+269"; artc['CG']="+242"; artc['CD']="+243"; artc['CK']="+682"; artc['CR']="+506"; artc['CI']="+225"; artc['HR']="+385"; artc['CU']="+53"; artc['CY']="+357"; artc['CZ']="+420"; artc['DK']="+45"; artc['DJ']="+253"; artc['DM']="+1767"; artc['DO']="+1809"; artc['EC']="+593"; artc['EG']="+20"; artc['SV']="+503"; artc['GQ']="+240"; artc['ER']="+291"; artc['EE']="+372"; artc['ET']="+251"; artc['FO']="+298"; artc['FK']="+500"; artc['FJ']="+679"; artc['FI']="+358"; artc['FR']="+33"; artc['GF']="+594"; artc['PF']="+689"; artc['GA']="+241"; artc['GM']="+220"; artc['DE']="+49"; artc['GH']="+233"; artc['GI']="+350"; artc['GB']="+44"; artc['GR']="+30"; artc['GL']="+299"; artc['GD']="+1473"; artc['GP']="+590"; artc['GU']="+1671"; artc['GT']="+502"; artc['GN']="+224"; artc['GW']="+245"; artc['GY']="+592"; artc['HT']="+509"; artc['HN']="+504"; artc['HK']="+852"; artc['HU']="+36"; artc['IS']="+354"; artc['IN']="+91"; artc['ID']="+62"; artc['IR']="+98"; artc['IQ']="+964"; artc['IE']="+353"; artc['IL']="+972"; artc['IT']="+39"; artc['JM']="+1876"; artc['JP']="+81"; artc['JO']="+962"; artc['KZ']="+7"; artc['KE']="+254"; artc['KI']="+686"; artc['KP']="+850"; artc['KR']="+82"; artc['KW']="+965"; artc['KG']="+996"; artc['LA']="+856"; artc['LV']="+371"; artc['LB']="+961"; artc['LS']="+266"; artc['LR']="+231"; artc['LY']="+218"; artc['LI']="+423"; artc['LT']="+370"; artc['LU']="+352"; artc['MO']="+853"; artc['MK']="+389"; artc['MG']="+261"; artc['MW']="+265"; artc['MY']="+60"; artc['MV']="+960"; artc['ML']="+223"; artc['MT']="+356"; artc['MH']="+692"; artc['MQ']="+596"; artc['MR']="+222"; artc['MU']="+230"; artc['YT']="+269"; artc['MX']="+52"; artc['FM']="+691"; artc['MD']="+373"; artc['MC']="+377"; artc['MN']="+976"; artc['ME']="+382"; artc['MS']="+1664"; artc['MA']="+212"; artc['MZ']="+258"; artc['MM']="+95"; artc['NA']="+264"; artc['NR']="+674"; artc['NP']="+977"; artc['NL']="+31"; artc['AN']="+599"; artc['NC']="+687"; artc['NZ']="+64"; artc['NI']="+505"; artc['NE']="+227"; artc['NG']="+234"; artc['NU']="+683"; artc['MP']="+1670"; artc['NO']="+47"; artc['OM']="+968"; artc['PK']="+92"; artc['PW']="+680"; artc['PS']="+970"; artc['PA']="+507"; artc['PG']="+675"; artc['PY']="+595"; artc['PE']="+51"; artc['PH']="+63"; artc['PL']="+48"; artc['PT']="+351"; artc['PR']="+1"; artc['QA']="+974"; artc['RE']="+262"; artc['RO']="+40"; artc['RU']="+7"; artc['RW']="+250"; artc['SH']="+290"; artc['KN']="+1869"; artc['LC']="+1758"; artc['PM']="+508"; artc['VC']="+1784"; artc['WS']="+685"; artc['SM']="+378"; artc['ST']="+239"; artc['SA']="+966"; artc['SN']="+221"; artc['RS']="+381"; artc['SC']="+248"; artc['SL']="+232"; artc['SG']="+65"; artc['SK']="+421"; artc['SI']="+386"; artc['SB']="+677"; artc['SO']="+252"; artc['ZA']="+27"; artc['ES']="+34"; artc['LK']="+94"; artc['SD']="+249"; artc['SR']="+597"; artc['SZ']="+268"; artc['SE']="+46"; artc['CH']="+41"; artc['SY']="+963"; artc['TW']="+886"; artc['TJ']="+992"; artc['TZ']="+255"; artc['TH']="+66"; artc['TL']="+670"; artc['TG']="+228"; artc['TK']="+690"; artc['TO']="+676"; artc['TT']="+1868"; artc['TN']="+216"; artc['TR']="+90"; artc['TM']="+993"; artc['TC']="+1649"; artc['TV']="+688"; artc['UG']="+256"; artc['UA']="+380"; artc['AE']="+971"; artc['GB']="+44"; artc['US']="+1"; artc['UY']="+598"; artc['UZ']="+998"; artc['VU']="+678"; artc['VA']="+379"; artc['VE']="+58"; artc['VN']="+84"; artc['VG']="+1284"; artc['VI']="+1340"; artc['WF']="+681"; artc['YE']="+967"; artc['ZM']="+260"; artc['ZW']="+263"; jQuery(document).ready(function(){ jQuery("#country").change(function() { var country = jQuery(this).val(); if (artc[country]) { jQuery("#phonenumbercode").hide(); jQuery("#phonenumbercodedropdown").html('<select id="phonenumbercodedd"><option>'+artc[country].replace(/\174/g,"</option><option>")+'</option></select>'); jQuery("#phonenumbercode").val(jQuery("#phonenumbercodedd").val()); } else { jQuery("#phonenumbercode").val(''); jQuery("#phonenumbercode").show(); jQuery("#phonenumbercodedropdown").html(''); } }); jQuery("#phonenumbercodedd").livequery("change", function(event) { jQuery("#phonenumbercode").val(jQuery(this).val()); }); var country = jQuery("#country").val(); if (artc[country]) { jQuery("#phonenumbercode").hide(); jQuery("#phonenumbercodedropdown").html('<select id="phonenumbercodedd"><option>'+artc[country].replace(/\174/g,"</option><option>")+'</option></select>'); jQuery("#phonenumbercode").val(jQuery("#phonenumbercodedd").val()); } else { jQuery("#phonenumbercode").val(''); jQuery("#phonenumbercode").show(); jQuery("#phonenumbercodedropdown").html(''); } }); 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.