Skip to content

Instantly share code, notes, and snippets.

@tamewhale
Created November 30, 2011 16:03
Show Gist options
  • Select an option

  • Save tamewhale/1409611 to your computer and use it in GitHub Desktop.

Select an option

Save tamewhale/1409611 to your computer and use it in GitHub Desktop.

Revisions

  1. tamewhale created this gist Nov 30, 2011.
    15 changes: 15 additions & 0 deletions test.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    <div id="scrollee" style="height:75%;" >
    <object id="object" height="90%" width="100%" type="text/html" data="http://en.wikipedia.org/"></object>
    </div>
    <a id="change-link" href="http://yahoo.com">link</a>
    <script type="text/javascript">
    window.onload = function() {
    var el = document.getElementById("change-link");
    el.onclick = function() {
    var target = this.getAttribute("href");
    var el = document.getElementById("object");
    el.setAttribute("data", target);
    return false;
    }
    }
    </script>