Support Forums

Questions about surveying? How does this thing work? We're here to help!

The Forums are now closed, because much of the older info is out of date.

Check out our Knowledge Base, ask a support question: Support.SurveyGizmo.com or ask a sales question with our Sales Contact Form.

Current User: Guest

Auto-Fit Your Embedded Survey

Topic Locked
UserPost

6:04
July 17, 2008


Jay

Guest

Doh! I see where getFirstParam gets called, I was blind yesterday. sorry.

I also notice that the resize works when it’s sizing up, but not when its sizing down.

eg. If theres a small amount of content on page1, and on the next page there is more, and the next there is more, the resizing will work perfectly.

but if there is a large ammount of content on page 1, when you go to page 2 (which has less content), the resizing will not work.

8:14
July 17, 2008


johny

Member

johny

posts 84

jp & jay

  • suggestion, try clearing your browser cache.

  • also, try using a different kind of browser (firefox, internet explorer, safari, etc). if you find this code does not work only with a particular browser, but does work with other browsers, please let us know.
  • make sure javascript is not disabled in your browser.
  • make sure your fallback size is large enough (as explained above).
  • retrace the instructions here carefully, and make sure you have performed all steps correctly.
  • make sure your double-quotes are normal, as explained in a previous reply.
  • if you check my sample survey link, you’ll see that it does shrink the iframe properly when the survey goes from a tall page to a short page, as well as short to tall.
  • maybe there’s something in your gizmo template which is conflicting?
  • my sample survey works in both firefox and internet explorer, but i’ve only tested it in windows. has anyone out there tried it on mac or linux?

i apologize that i don’t have a lot of time at the moment to troubleshoot your problem.

8:45
July 17, 2008


johny

Member

johny

posts 84

incidentally, if you want your iframe survey to be transparent, so you can see the webpage behind it, don’t forget the following fix for ie:

http://www.surveygizmo.com/forum/how-do-i-how-does-this-work-wtf/how-to-make-embed-transparent-in-internet-explorer/page-1/

8:34
July 19, 2008


Starr

Guest

Hi,

I stumbled on to this great script by accident and could use a little help setting it up. I’m not using wordpress or a survey but a regular webpage with links which I need loaded in an iframe.

I got the first step and I’ve uploaded the extra files. But where do I put the:

iframe id=”HiddenIframe” width=”1″ height=”1″ style=” position : absolute; top : 0px; left : 0px; visibility: hidden; “/iframe

script type=”text/javascript” src=”http://PATH/TO/YOUR/WEBSERVER/fx.js
/script

script>loadHiddenIframe(
“http://PATH/TO/YOUR/WEBSERVER/hiddeniframe.html”
)/script

I’ve changed the path to my own, but does this go on the page that is being loaded? I’ve tried it but can’t get it to work. Any help would be appreciated.

Thanks!

12:58
July 21, 2008


johny

Member

johny

posts 84

johny said:

go to the SurveyGizmo.com/Edit Survey/”Look and Feel” page.

scroll down to “This Theme’s HTML Template”.

scroll inside the html template to the bottom, and paste the code below.

7:50
August 21, 2008


Saran

Guest

Hi Johny,

The above solution of yours works great for any normal aspx page as iframe source.

When the source page of iframe is ajax enabled, this solution doesnt work. Since the page will not reload during ajax requests, this solution fails abruptly.. is there any workaround for ajax enabled pages?

Thanks in advance!

Saran

10:51
August 22, 2008


johny

Guest

hi saran


i'm not an ajax expert. you'll need to experiment, or maybe someone else here can help. here are some thoughts.


i'm assuming that you are using ajax to page through the survey, without refreshing the entire webpage. that alone is a neat trick you should share on this forum!


i believe you need to hook the auto-fit triggers into the ajax refresh event somehow. the normal sequence of my code is:


  • when the survey loads into the iFrame in your webpage, my script inside the survey calls the LoadHiddenIframe function (which is supposed to be located in your parent web-page)
  • that function loads the hidden iFrame inside the survey
  • the hidden iFrame in turn calls the resizeIframe function (located in my js file, which you should have uploaded to your server)

so, if your ajax-survey is not resizing, maybe one of the above actions is not happening. maybe you missed one of the steps in my setup instructions.


it might help for you to get the thing working without ajax first, if you haven't.


jp, jay? did you solve your issue?

1:05
June 25, 2009


Lee

Guest

Great solution, came across this lately. HAve a question:

When the parent page resizes the height according to the remote page height I'd like to have a minimum height of the parent page equal to the viewport of the window, so that the page stretches in height to the top and to the bottom of the viewport. This in the case that the remote page is very small in height. Is tere any way to accomplish this?

Thank U so much…

Lee

1:43
June 25, 2009


johny

Guest

i don't know what a viewport is, but my solution above explains how to use the “MinimumHeight” attribute

2:27
June 25, 2009


Lee

Guest

Hi again and thks for a very quick reply…

With the viewport I mean the effective window area without all the surroundings like tool bars and chrome. Your scripts work just perfect, I have absolutely no problems with that.

I just want to find a way to always have the same pageheight so it fills the whole window from top to bottom, i.e. small remote pages expands to the total height and tall remote pages are scrollable.

I figure putting something inside the fx.js script into the function loadHiddenIframe(path) like if height is less than the effective window height of the parent window then the height should be the same as the effective window height. Hope this makes sense.

Appreciate if you have the time to sort this out.

Lee

5:02
June 25, 2009


johny

Guest

if you want a too-large remote page to get fixed to the max frame-size, and you want a too-small remote page to get expanded.

in other words, you want a fixed frame size. you don't need any script to accomplish that. just set the iframe size in the parent page to the exact height you want, and make sure you're showing scrollbars in the iframe.



The Forums are now closed, because much of the older info is out of date.

Check out our Knowledge Base, ask a support question: Support.SurveyGizmo.com or ask a sales question with our Sales Contact Form.