ajaxzip3 / ajaxzip3.github.io

https://ajaxzip3.github.io/
MIT License
208 stars 113 forks source link

var #4

Closed diennguyen2002 closed 8 years ago

diennguyen2002 commented 8 years ago

JSONDATA = 'https://yubinbango.github.io/yubinbango-data/data'; CACHE = []; PREFMAP = [ null, '北海道', '青森県', '岩手県', '宮城県', '秋田県', '山形県', '福島県', '茨城県', '栃木県', '群馬県', '埼玉県', '千葉県', '東京都', '神奈川県', '新潟県', '富山県', '石川県', '福井県', '山梨県', '長野県', '岐阜県', '静岡県', '愛知県', '三重県', '滋賀県', '京都府', '大阪府', '兵庫県', '奈良県', '和歌山県', '鳥取県', '島根県', '岡山県', '広島県', '山口県', '徳島県', '香川県', '愛媛県', '高知県', '福岡県', '佐賀県', '長崎県', '熊本県', '大分県', '宮崎県', '鹿児島県', '沖縄県' ]; fetchRemote = function {....}

When I build, errors happen, then I try to put "var" before them EX: var JSONDATA ... var CACHE ... var PREFMAP .. var fetchRemote ....

And it works. So if possible please add "var". BTW, i built by monaca (Hybrid App Development Tools). Thanks in advanced

koba-ninkigumi commented 8 years ago

This library is deprecated.

Please use it. >>> https://github.com/yubinbango/yubinbango

Thanks.

diennguyen2002 commented 8 years ago

Thanks a lot !

diennguyen2002 commented 8 years ago

Quick question: https://github.com/yubinbango/yubinbango Does it work on mobile? I try on desktop, that works perfectly. But still not on mobile.

koba-ninkigumi commented 8 years ago

@diennguyen2002 What's your environment? iOS? Android? What's version?

diennguyen2002 commented 8 years ago

I just used your example code:

<script src="https://yubinbango.github.io/yubinbango/yubinbango.js" charset="UTF-8"></script>
<form class="h-adr">
  <span class="p-country-name" style="display:none;">Japan</span>

  〒<input type="text" class="p-postal-code" size="8" maxlength="8"><br>

  <input type="text" class="p-region p-locality p-street-address p-extended-address" /><br>
</form>

It works on desktop browser. But on mobile Android monaca (Hybrid App Development Tools) does not (I used angularjs and onsen ui). Do you have any idea?

koba-ninkigumi commented 8 years ago

use angular2? Sample code, See >>> http://plnkr.co/edit/syYdWNQ33uWaomGWT2P5?p=preview

If you make dynamic dom, you should call init code:

ngAfterViewChecked() { new YubinBango.MicroformatDom(); }

cf. https://angular.io/docs/ts/latest/guide/lifecycle-hooks.html

Good Luck!