Hi all,
I am using an iframe to display pages that I load from a menu on the parent page. I don't have the ability to modify the pages I'm linked to. On one of the pages, there is navigation that I don't want my end users to have access to. My best solution to prevent access to this is to position the page below the navigation on loading, and lock the iframe's scrolling.
However, since I load multiple pages, I need to have this positioning change depending on the link from the menu that the users select.
I attempted to create a Javascript function to solve this problem.
In my link, I include this:Code:<head> <script language="JavaScript"> function repositionIframe(iframeId, iframeMarginHeight) { if (iframeMarginHeight>0) { document.getElementById(iframeId).style.marginheight=iframeMarginHeight; } } </script> </head>
This isn't working. Does anyone know why, or an alternative solution? I am very new to JavaScript so it could be something basic like syntax.Code:onclick="repositionIframe('iframe', 200)"


Reply With Quote
Bookmarks