<!DOCTYPE html>
<html>
<body onload="nav()">
<script>
function nav() {
    var url = "javascript:'<script>" + 
      "top.postMessage(\"Hello from child\", \"*\");" + 
      "document.write(\"Message sent\");" +
      "</scri" + "pt>'";

    window.location.href = url;
}
</script>
Sending...
</body>
</html>
