Commit 5e25e0f808a047e94224b1c0d4842f7a240a1182

Authored by Nikita Kulshreshtha
1 parent 735e848c

added iframeresize.html

400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj
... ... @@ -69,7 +69,6 @@
69 69 <Content Include="app\views\Home\printPreview.html" />
70 70 <Content Include="app\views\LabExerc\lab-exercises-detail.html" />
71 71 <Content Include="app\views\iframeresizer.html" />
72   - <Content Include="app\views\Link\iframeresizer.html" />
73 72 <Content Include="app\views\Link\Link-view.html" />
74 73 <Content Include="app\views\AnatTest\AnatTest-view.html" />
75 74 <Content Include="app\views\AOD\AOD-view.html" />
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/Link/iframeresizer.html deleted
1   -<html>
2   -<head>
3   -<title></title>
4   -</head>
5   - <body onload="parentIframeResize();" >
6   - <div>Hi Amrita</div>
7   - <script type="text/javascript">
8   - // Tell the parent iframe what height the iframe needs to be
9   - function parentIframeResize() {
10   - var height = getParam('h');
11   - //checking for broweser IE7/8/9,FF
12   - if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { //test for MSIE x.x;
13   - var ieversion = new Number(RegExp.$1) // capture x.x portion and store as a number
14   - if (ieversion == 9) {
15   - if (!parent.parent.name)
16   - parent.parent.resizeIframe(height);
17   - else
18   - parent.resizeIframe(height);
19   - }
20   - else {
21   - if (!parent.parent.parent.id) {
22   - if (parent.parent.resizeIframe!=undefined)
23   - parent.parent.parent.resizeIframe(height);
24   -
25   - }
26   - else if (!parent.parent.id) {
27   - parent.parent.resizeIframe(height);
28   - }
29   - else
30   - parent.resizeIframe(height);
31   - }
32   - }
33   - else {
34   - if (!parent.parent.name)
35   - {
36   - if (parent.parent.resizeIframe!=undefined)
37   - parent.parent.resizeIframe(height);
38   - }
39   - else
40   - parent.resizeIframe(height);
41   - }
42   - }
43   -
44   - // Helper function, parse param from request string
45   - function getParam(name) {
46   - name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
47   - var regexS = "[\\?&]" + name + "=([^&#]*)";
48   - var regex = new RegExp(regexS);
49   - var results = regex.exec(window.location.href);
50   - if (results == null)
51   - return "";
52   - else
53   - return results[1];
54   - }
55   -
56   - function resizeIframe(dHeight) {
57   - var iframe = document.getElementById('externalLink');
58   - if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
59   - var ieversion = new Number(RegExp.$1)
60   - if (ieversion == 8 || ieversion == 7) {
61   - iframe.height = parseInt(dHeight) + 250;
62   - }
63   - else {
64   - iframe.height = dHeight;
65   - }
66   - }
67   - else {
68   - iframe.height = dHeight;
69   - }
70   - }
71   -
72   - </script>
73   - </body>
74   -</html>
400-SOURCECODE/AIAHTML5.Web/app/views/iframeresizer.html
1   -
2 1 <html>
3 2 <head>
4 3 <title></title>
5 4 </head>
6 5 <body onload="parentIframeResize();" >
7   -
  6 + <div>Hi Amrita</div>
8 7 <script type="text/javascript">
9 8 // Tell the parent iframe what height the iframe needs to be
10 9 function parentIframeResize() {
... ... @@ -53,6 +52,23 @@
53 52 else
54 53 return results[1];
55 54 }
  55 +
  56 + function resizeIframe(dHeight) {
  57 + var iframe = document.getElementById('externalLink');
  58 + if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
  59 + var ieversion = new Number(RegExp.$1)
  60 + if (ieversion == 8 || ieversion == 7) {
  61 + iframe.height = parseInt(dHeight) + 250;
  62 + }
  63 + else {
  64 + iframe.height = dHeight;
  65 + }
  66 + }
  67 + else {
  68 + iframe.height = dHeight;
  69 + }
  70 + }
  71 +
56 72 </script>
57 73 </body>
58   -</html>
59 74 \ No newline at end of file
  75 +</html>
... ...