SharePoint - iframe in sharepoint webpart

Asked By Hema Moss on 04-Dec-08 01:38 AM
I'm adding a Silverlight control to my Sharepoint webpart. I want to add iframe to my webpart. how can i do this?

http://www.manning-sandbox.com/thread.jspa;jsessionid=AkV0Uumygu-IFOUr?messageID=59810&

[)ia6l0 iii replied to Hema Moss on 04-Dec-08 01:48 AM
end of post

re

Web Star replied to Hema Moss on 04-Dec-08 02:21 AM

try this

C_A P replied to Hema Moss on 04-Dec-08 02:27 AM
Enhancing the IFrame WebPart
Description
    
http://blogs.tamtam.nl/mart/default,date,2005-06-07.aspx
 
<script type="text/javascript">
        function resizeToFit(that){
                var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
                var objIframe = window.parent.document.getElementById('resizeToFit');
                var intScrollX, intScrollY, intWinWidth, intWinHeight, intMaxWidth, intMaxHeight;
               
                var intWhileCount = 0;
                do{
                    // scroll the document by 1 pixel
                    window.scrollTo(1,1);
                    // measure the scroll position           
                    intScrollX = (document.all) ? document.body.scrollLeft : window.pageXOffset ;
                    intScrollY = (document.all) ? document.body.scrollTop : window.pageYOffset ;
                    // measure window size
                    intWinWidth = (document.all) ? document.body.offsetWidth : window.innerWidth ;
                    intWinHeight = (document.all) ? document.body.offsetHeight : window.innerHeight ;
                    // if the scroll position is not 0
                    if(intScrollX>0){
                        // make the window larger
                        window.resizeBy(32,0);
                        // make the iframe larger
                        if(objIframe!=null && !document.all) objIframe.style.width = (objIframe.style.width=='') ? '64px' : (parseInt(objIframe.style.width) + 32) + 'px';
                    }
                    if(intScrollY>0){
                        // make the window larger
                        window.resizeBy(0,32);
                        // make the iframe larger
                        if(objIframe!=null && !document.all) objIframe.style.height = (objIframe.style.height=='') ? '64px' : (parseInt(objIframe.style.height) + 32) + 'px';
                    }
                    // count the steps
                    intWhileCount += 1;
                }while((intScrollX>0 || intScrollY>0) && intWhileCount<900);
            }
            function waitToFit()
            {
                setTimeout("resizeToFit()",100);   
            }
           
            onload = waitToFit;
</script>

reply
Hema Moss replied to C_A P on 04-Dec-08 03:01 AM
what is that script? where should i write this script?