View JS-get-value-SSJS-variable.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script runat="server"> | |
Platform.Load("core","1.1.1"); | |
// set the value of a firstName variable | |
var firstName = "John"; | |
</script> | |
<script> |
View JS-get-AMPscript-variable.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
var @emailAddress | |
/* get email address from the sendable data extension */ | |
set @emailAddress = AttributeValue("email") | |
]%% | |
<script> |
View SSJS-set-AMPscript-variable.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script runat="server"> | |
Platform.Load("core","1.1.1"); | |
// set the value of a firstName variable | |
var firstName = "John"; | |
// pass the value to an AMPscript @firstName variable | |
Variable.SetValue("@firstName", firstName); |
View SSJS-retrieve-attribute-value.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script runat="server"> | |
Platform.Load("core","1.1.1"); | |
// get the value of the emailaddr personalization string | |
var email = Attribute.GetValue("emailaddr"); | |
Write("<br>email: " + email); | |
</script> |
View SSJS-retrieve-AMPscript-variable.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
var @emailAddress | |
/* get email address from the sendable data extension */ | |
set @emailAddress = AttributeValue("email") | |
]%% | |
<script runat="server"> |
View qr-api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://sfmarketing.cloud/ |
View generate-qrcode.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript" src="https://xxxxx/qrcode.js"></script> | |
</head> | |
<body> | |
%%[ | |
set @data = 'http://sfmarketing.cloud/' |
View qrcode.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @fileoverview | |
* - Using the 'QRCode for Javascript library' | |
* - Fixed dataset of 'QRCode for Javascript library' for support full-spec. | |
* - this library has no dependencies. | |
* | |
* @author davidshimjs | |
* @see <a href="http://www.d-project.com/" target="_blank">http://www.d-project.com/</a> | |
* @see <a href="http://jeromeetienne.github.com/jquery-qrcode/" target="_blank">http://jeromeetienne.github.com/jquery-qrcode/</a> | |
*/ |
View qrcode-ampscript.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
set @data = 'https://sfmarketing.cloud/' | |
set @qrcode = concat('https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=', @data) | |
]%% | |
<img src="%%=v(@qrcode)=%%"> |
View barcode-ampscript.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
set @value = Lookup("Barcode Data","Barcode","SubscriberKey", _subscriberkey) | |
set @codabar = BarcodeURL(@value, "Codabar", 100, 50) | |
]%% | |
<img src="%%=v(@codabar)=%%"> | |
<br> | |
%%=v(@value)=%% |
NewerOlder