StacyZ Posted August 1, 2019 Share Posted August 1, 2019 I had originally posted this in the barcode section. Hello, I'm having an issue dealing with a QR Code where there are ampersands in the destination URL. I'll paste the code I have below but please note that the first part of the URL will be changed here due to security. That isn't the area I'm having trouble with however, the problem is with the last section that reads ("&DMC-DIRECTMAIL&mid=H3W&version=A") QR Code Rule: var dataforbarcode = ("http://order.com/H3W/Main-A.asp?No=" + encodeURIComponent (Left(Field("CODE"), 8) + ("&DMC-DIRECTMAIL&mid=H3W&version=A"))); var dmbarcodeobj = new QRBarcode; dmbarcodeobj.encodingmode = (Left(Field("CODE"), 8)); dmbarcodeobj.pointSize = 3.5; return dmbarcodeobj.Make(dataforbarcode); This code returns the correct page without the customer information. I need to get the customer information to show. Thank you Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted August 1, 2019 Share Posted August 1, 2019 (edited) Try this instead: var dataforbarcode = "http://order.com/H3W/Main-A.asp?No=" + encodeURIComponent (Left(Field("CODE"), 8)) + "&DMC-DIRECTMAIL&mid=H3W&version=A"; You don't need to URL encode the part of the URL that's already in the correct format. Also, get rid of this line: dmbarcodeobj.encodingmode = (Left(Field("CODE"), 8)); The default encoding mode should work fine. Edited August 1, 2019 by Dan Korn Quote Link to comment Share on other sites More sharing options...
StacyZ Posted August 2, 2019 Author Share Posted August 2, 2019 Thank you Dan! 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.
Note: Your post will require moderator approval before it will be visible.