The Experience

function myListener(msg) {
var domainRegex='(https*:\\/\\/.*\\.tripadvisor\\.*)’
var pattern = new RegExp(domainRegex,[“i”]);
var match = pattern.exec(msg.origin);

if (match != null && msg.data.substring(0, 7) == “height=”) {
var height = msg.data.substring(7,100);
document.getElementById(“MYIFRAME”).height = height+”px”;
}
}
window.addEventListener(‘message’, myListener);

Hard Rock Specials