Having 2 "out of domain" pages in one aspx page with dynamic heights

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Manikrag
    New Member
    • Jun 2009
    • 62

    #16
    Frinavale - ur idea is sounding do-able but not sure how esay will it be..

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #17
      Which idea, the MasterPage/content page or the Cookies?

      Comment

      • Manikrag
        New Member
        • Jun 2009
        • 62

        #18
        Cookie one..please let me know if you has any example of that

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #19
          Yeah I've never done it before... don't know if it's even possible (hehe)

          I can give it a try but I haven't really done that much with cookies in JavaScript (other than creating a cookie to test if the browser has cookies enabled).

          Comment

          • Manikrag
            New Member
            • Jun 2009
            • 62

            #20
            lolz..let me try it too. I will get back to you on this..thanks anyway

            Comment

            • Frinavale
              Recognized Expert Expert
              • Oct 2006
              • 9749

              #21
              OK we don't need to use cookies at all.
              There's an easier way to do this.

              The following code will grab the clientHeight (or offsetHeight) of the <body> tag in the iframe.

              It isn't perfect though...there' s some sort of padding thing going on that this code doesn't take into consideration so the scroll bar still shows up. I have added something like 20 to the newheight value to compensate for this but for the larger page that I'm testing with it still needs more:
              Code:
              <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
              <html xmlns="http://www.w3.org/1999/xhtml">
              <head></head>
              <body>
                <script type="text/javascript">
                  function autoResize(element)
                  {
                    var newheight;
                    if(document.clientHeight) {
                      newheight = element.contentWindow.document.body.clientHeight + 20;
                    }else{
                      newheight = element.contentWindow.document.body.offsetHeight + 20;
                    }
                    element.style.height = newheight +"px";
                   }
                </script>
                <iframe src="testing.html" id="testing" onload="autoResize(this)"></iframe>
                <iframe src="HideShowColumnsTest.html" onload="autoResize(this)"></iframe>
              </body>
              </html>
              -Frinny

              Comment

              • Frinavale
                Recognized Expert Expert
                • Oct 2006
                • 9749

                #22
                Ahh, for the pages that you're loading, set the <body> tag's style to "margin:0px ; padding:0px".

                Comment

                • Manikrag
                  New Member
                  • Jun 2009
                  • 62

                  #23
                  Ahh, for the pages that you're loading, set the <body> tag's style to "margin:0px ; padding:0px" and the problem will be solved.
                  the child pages are coming out of domain..can't change them

                  Comment

                  • Manikrag
                    New Member
                    • Jun 2009
                    • 62

                    #24
                    The following code will grab the clientHeight (or offsetHeight) of the <body> tag in the iframe.
                    ..this code did change the height to default height that is around 200px..that means..it did not work..

                    Comment

                    • Frinavale
                      Recognized Expert Expert
                      • Oct 2006
                      • 9749

                      #25
                      It didn't work?
                      Really?

                      It worked for me (FireFox and IE8)......

                      Comment

                      • Frinavale
                        Recognized Expert Expert
                        • Oct 2006
                        • 9749

                        #26
                        What are the url's of the pages that you're loading?

                        Comment

                        • Manikrag
                          New Member
                          • Jun 2009
                          • 62

                          #27
                          It didn't work?
                          Really?

                          It worked for me (FireFox and IE8)......
                          Yes it did not work for me..I tried in IE6 and FF

                          Comment

                          • Manikrag
                            New Member
                            • Jun 2009
                            • 62

                            #28
                            both the applications are on an intranet and are as follows:

                            server.domain.c om/search/fhaseservice/default.asp

                            server.domain.c om/scripts/rfx.exe/Webinator/search?db=db&uq =&pr=Web&quer y=

                            Comment

                            • Frinavale
                              Recognized Expert Expert
                              • Oct 2006
                              • 9749

                              #29
                              Oh that wont work for me...I can't get into your intranet from here....

                              Comment

                              • Frinavale
                                Recognized Expert Expert
                                • Oct 2006
                                • 9749

                                #30
                                I tested using the bytes url (across domain) and had the same problem...
                                My script worked because I was in the same domain...sorry

                                Hmmm...

                                Do you have access to code of the web pages that loading?

                                Comment

                                Working...