e-sites / PAPI

A lightweight jQuery plugin that makes working with the Postcode API (@postcodeapi) easy as pie.
http://github.e-sites.nl/papi/
MIT License
6 stars 2 forks source link

Cant get it woking in ie <10 #3

Closed Steefs closed 9 years ago

Steefs commented 10 years ago

I set the proxy.php file for IE versions below 10 but i keep getting the message:

PAPI error: no additional data found

this is my code:

$.papi.setApiKey('mykey');
    // Set PHP proxy for IE
    if (  ie <= 9 ) {
            $.papi.proxy('http://www.url.nl/wp-content/themes/my-theme/js/proxy.php'); // location of the proxy file

    }

    // Fifth example: fetch BAG data
    $('.postcode input, .housenumber input, .toevoeging input').on('change', function () {
        $.papi
            .lookup($('.postcode input')[0].value, this.value, true)
            .ok(function (data) {
                this
                    .setValue('street', $('#input_15_15')[0])
                    .setValue('town', $('#input_15_16')[0]);
                    changefields();
            })
            .notfound(function (data) {
                $('.adrescompleet').empty();
            });
    });
    }
boye commented 10 years ago

the proxy url should always be a relative path, in your case it would be something like: /wp-content/themes/my-theme/js/proxy.php

Steefs commented 10 years ago

I allready tried a lot of paths and it still won't work, the site is build in wordpress so a relative path react on the url of the page. This is an example of the page: http://openingbarneveld.nl/testaanmelden/

2014-03-21 12:51 GMT+01:00 Boye notifications@github.com:

the proxy url should always be a relative path, in your case it would be something like: wp-content/themes/my-theme/js/proxy.php

Reply to this email directly or view it on GitHubhttps://github.com/boye/PAPI/issues/3#issuecomment-38269107 .

~Steefs | Specialist in ontwerp en realisatie van websites en webwinkels

www.stefanremmerde.nl 06-53197805