|
#1
|
|||
|
|||
|
I asked about this on the AA forum as well - but I don't know how often some of you get there.
I need to have an iframe to change size with the page it contains. Where page A has an iframe that contains page B of another site - and from within the iframe page B can be opened to other larger or smaller pages - I need the iframe to re-size automatically. I know it can be done - not sure how to do it - especially with the limitations and restrictions that are present on AA interior pages. What is the best and most stable ways of doing this that will work on my AA site? Heck you guys know more questions I should be concerned with besides knowing how to get'er done. Thanks big time in advance -
__________________
Don Price REALTOR Advanced Real Estate Services & Staging Pinehurst Real Estate Listings Pinewild CC Real Estate Advocate Home Inspection Services, LLC Pinehurst Home Inspector |
|
#2
|
|||
|
|||
|
Unfortunately, this just isn't technically possible on AA's site (or anyone else's site for that matter). The problem is that the code you would need to do something like this is prevented from running by the browser (IE, Firefox, Safari, etc) due to what is known as "cross-domain scripting" security rules (Google that phrase if you want to know more).
Essentially, cross-domain scripting's security rules prevent one page from knowing anything at all about the page being framed, unless it's on the same domain. For example, say you framed http://my.yahoo.com on your site and then wanted to know more about what was on that page, how tall it is (in pixels), etc. Because the visitor visiting your site may be signed in to Yahoo! at that point, the browser itself essentially throws errors when you try to find out any info about that page that you framed. The best you can do is set the iframe's "scrolling" attribute to "auto." If you want to hide the horizontal scroll, you can set add 'style="overflow-x: hidden;"' as one of the iframe attributes. Hope that answers your question, and sorry for the bad news..
__________________
Andrew Mattie, Software Engineer Diverse Solutions |
|
#3
|
||||
|
||||
|
I had to use iFrames in the past only to frame third party IDX data to embed it within the site... in those cases I would find the size of an average long page and set is as the height of my iFrame. I think it anywhere from 1000 to 1200 pixels. Style it with no borders and auto scrolling.
__________________
IBS Team Editor "The thinking that got us into this mess will be insufficient to get us out of it." Albert Einstein |
|
#4
|
||||
|
||||
|
What Max said is how I would do it, too, Don.
I had the same issues framing IDX summary pages, which opened ito larger detailed pages. What is the "page B" you are trying to frame? So we can see what you are trying to deal with. |
|
#5
|
|||
|
|||
|
Thanks - Sadly I found out there is no real way to do what I wanted.
I had it set up by accident the way it was suggested here - but AA went in to help out and changed it - so I thanked them and went back in and put it back the way I had it. I went to a greater height and I am working on getting the width exact, but first I need to eliminate the border around the frame so it blends in better. I am using it on both my idx and QuickHomes page. I went to building pages with an iframe for both for several reasons which included Google always giving me errors on the idx pages and the lack of instructions to let people know how to use the idx. I'm not comfortable with anything now - but I think I am heading somewhere with it - just not sure where I am going? |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|