Announcement

Collapse
No announcement yet.

Address Validation integration problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Address Validation integration problem

    I'm implementing Merchant 10s new address-validation. But The popup is not displaying.
    Can anyone assist?

    It's throwing a javascript error
    window.openDialog('address-validation');
    Uncaught TypeError: window.openDialog is not a function

    Code:
    window.addEventListener('load', function () {
        if (showBilling !== null) { document.querySelector('#billing_to_show').click(); }
        window.openDialog('address-validation');
        setFirstSuggestion();
    });
    As I look at the line, the syntax looks wrong.
    Ray Yates
    "If I have seen further, it is by standing on the shoulders of giants."
    --- Sir Isaac Newton

    #2
    Originally posted by RayYates View Post
    I'm implementing Merchant 10s new address-validation. But The popup is not displaying.
    Can anyone assist?

    It's throwing a javascript error
    window.openDialog('address-validation');
    Uncaught TypeError: window.openDialog is not a function

    Code:
    window.addEventListener('load', function () {
    if (showBilling !== null) { document.querySelector('#billing_to_show').click(); }
    window.openDialog('address-validation');
    setFirstSuggestion();
    });
    As I look at the line, the syntax looks wrong.
    Hello RayYates,

    I showed this to a developer and they suggested you use

    window.open()

    Not

    window.openDialog

    The window.open() function will open a new page. If you're trying to make a dialog pop up you should use a JavaScript library for dialogs.

    https://micromodal.vercel.app/ is a nice clean js and you can style it if you want.

    Can you give that a try and see if it works?

    Warm Regards
    Last edited by rbuelna; 04-22-21, 02:01 PM.
    Rafael Buelna
    Miva Support Engineer
    800.608.MIVA (24/7 Support)
    http://www.miva.com
    http://www.miva.com/support

    Comment

    Working...
    X