Trying to use jquery QRcode library in extjs

I thought I was doing this correctly but after I call the jQuery function and gather the data I need, when I pass it back into qrCodeHtmlEl it shows up on the webpage as [object, Object], I am unsure why it isn't being rendered as the actual QR code?

I am using this library "http://jeromeetienne.github.com/jquery-qrcode" and I have installed the script .

Here is a snippet of the code I am working. This and everything is basically a html DOM element. Any help on how to implement this properly is much appreciated!

var qrCodeEl = jQuery('#qrcode').qrcode({
            text: 
                ('BEGIN:VCARD' + 
                '\r\nN:' + 
                record.get('surname') +
                ';' + 
                record.get('name') +
                ';\r\nTEL:' + 
                record.get('phone') +
                '\r\nEMAIL:' + 
                record.get('email') + 
                '\r\nVERSION:3.0' + 
                '\r\nEND:VCARD')
        });
        let qrCodeHtmlEl = createEl("DIV", qrCodeEl, {
            "id": "qrcode",
            "class": "profileTitleContactDetails qrCodeEl",
            "style": "margin-left:10px;",
        });
        
        phoneAndEmailContainer.appendChild(qrCodeHtmlEl);


Read more here: https://stackoverflow.com/questions/66270712/trying-to-use-jquery-qrcode-library-in-extjs

Content Attribution

This content was originally published by FrangosChickenSauce at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: