Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
cramforce committed Feb 27, 2012
0 parents commit c38462f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
12 changes: 12 additions & 0 deletions a.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>

<h1>Frame A</h1>
<input type="button" id="a" value="Click Me">

<script>

document.getElementById('a').onclick = function() {
parent.frames.b.hello();
}

</script>
12 changes: 12 additions & 0 deletions b.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>

<h1>Frame B</h1>
<input type="text" id="b" value="World">

<script>

window.hello = function() {
alert('Hello' + document.getElementById('b').value);
}

</script>
7 changes: 7 additions & 0 deletions parent.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!doctype html>

<h1>Parent</h1>

<iframe src="http://pastehtml.com/view/bpkibllcu.html" name=a width=400 height=300></iframe>

<iframe src="http://pastehtml.com/view/bpkidzjhq.html" name=b width=400 height=300></iframe>

0 comments on commit c38462f

Please sign in to comment.