Commit f7e16af8eceb1ad19a70f3a8be9dc6e942bae556
1 parent
6db064db
external Product fix
Showing
1 changed file
with
25 additions
and
0 deletions
400-SOURCECODE/AIAHTML5.Web/app/views/Link/Link-view.html
... | ... | @@ -7,3 +7,28 @@ |
7 | 7 | </div> |
8 | 8 | </div> |
9 | 9 | </div> |
10 | + | |
11 | +<script> | |
12 | + $(document).ready(function () { | |
13 | + var myEventMethod = null; | |
14 | + var myEventListener = null; | |
15 | + var myEventMessage = null; | |
16 | + myEventMethod = window.addEventListener ? "addEventListener" : "attachEvent"; | |
17 | + // create event listener | |
18 | + myEventListener = window[myEventMethod]; | |
19 | + // browser compatibility: attach event uses onmessage | |
20 | + myEventMessage = myEventMethod == "attachEvent" ? "onmessage" : "message"; | |
21 | + // register callback function on incoming message | |
22 | + myEventListener(myEventMessage, function (e) { | |
23 | + // we will get a string (better browser support) and validate | |
24 | + // if it is an int - set the height of the iframe #my-iframe-id | |
25 | + if (e.data == parseInt(e.data)) { | |
26 | + document.getElementById('externalLink').height = e.data + "px"; | |
27 | + $('body').scrollTop(0); | |
28 | + } | |
29 | + }, false); | |
30 | + }); | |
31 | + | |
32 | +</script> | |
33 | + | |
34 | + | ... | ... |