Skip to content

Instantly share code, notes, and snippets.

View arvinhubert's full-sized avatar

Arvin Hubert Echavez arvinhubert

View GitHub Profile
@arvinhubert
arvinhubert / accountVerification.js
Created January 18, 2021 07:44 — forked from srveit/accountVerification.js
File for sending and resending verification codes via Twilio's SMS API
var TWILIO_SID = '<Twilio-SID>',
TWILIO_TOKEN = '<Twilio-token>',
FROM_PHONE = '3143006228',
VERIFICATION_MESSAGE_INTRO = 'Your verification code: ',
TELE_PREFIX = '+1',
twilio = require('twilio'),
Q = require('q'),
_ = require('lodash');
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title> Window</title>
</head>
<body>
<h1>Parent Window</h1>
<p>Send Message: <button id="message_button">Hi there iframe</button></p>
@arvinhubert
arvinhubert / README.md
Created May 28, 2019 08:14 — forked from pbojinov/README.md
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe