Appnitro Software Forums » MachForm

Auto expand/adjustable iframe

(50 posts)
  • Started 3 years ago by yuniar
  • Latest reply from jakedonahue

  1. lapiz
    Member

    I got this working in all browsers; however, I got my form on top of a black background and when I check my site in Internet Explorer(IE 7 & IE8) the iframe displays with a white background and not transparent as in all the other browsers. Any ideas

    Posted 1 year ago #
  2. skyblue
    Member

    I can't get this to work. Can someone look at my code??

    http://www.erindavidson.ca/newhgym/weightlossclinic.html

    The form is supposed to appear directly above the red banner with the runner. The form won't even show up...

    Posted 1 year ago #
  3. lapiz
    Member

    Try insert your form into a div container

    Posted 1 year ago #
  4. skyblue -- try to change your iframe source.
    I see that you are currently having this:

    <iframe src="http://erindavidson.ca/machform/embed.php?id=2" frameborder="0" scrolling="no" width="100%" height="1" id="the_iframe" onload="calcHeight();" name="the_iframe"></iframe>

    change it to become:

    <iframe src="http://www.erindavidson.ca/machform/embed.php?id=2" frameborder="0" scrolling="no" width="100%" height="1" id="the_iframe" onload="calcHeight();" name="the_iframe"></iframe>

    note the "www" being added into your iframe src.

    Posted 1 year ago #
  5. lapiz -- try to add this attribute into your iframe code:

    allowTransparency="true"
    Posted 1 year ago #
  6. lapiz
    Member

    Works! Thank you so much!

    Posted 1 year ago #
  7. skyblue
    Member

    Thank yuniar, changing it to www. worked. However, the form does not show up now if i type in erindavidson.ca/newhgym/weightlossclinic.html only if I type www. before that.

    This could be problematic when transferring the forms to their domain because if people don't type in the www before their domain name, then they won't be able to see the form. How can this be resolved?

    Plus on the page it does show up, the iframe does not collapse... you still have to scroll up the page to see the submission confirmation.

    Posted 1 year ago #
  8. I strongly suggest to redirect all traffic to your "non www" address (erindavidson.ca) to www.erindavidson.ca to avoid confusion and errors.

    Also, having those two domains (www and non www) without redirect is causing some SEO problem with Google, known as canonical URL problem.

    You can use a permanent redirect (301 redirect) to fix this. If you aren't sure on how to do this, please contact your hosting to get some help. Usually, you can simply use an ".htaccess" file.

    Posted 1 year ago #
  9. skyblue
    Member

    Okay, that is a possible solution, however why is it necessary? I have 2 forms, and the one doesn't have javascript added to it. This one without js still displays on both my www and my non www. Why is it as soon as this javascript is added, it won't display on both www and non-www?

    Posted 1 year ago #
  10. skyblue
    Member

    Also, how do I prevent the user from having to scroll up to read the "Submission received" notice?? I just want it to collapse the height of the iframe so that there isn't a huge blank space below hit.

    Posted 1 year ago #
  11. This is due to the Javascript limitation. To be able auto calculating the height of your iframe, the javascript need to get the content height of the form. Unfortunately, it can only does so if the form is coming from the same domain.

    www and non-www are considered different domains, thus the code won't work.

    Regarding your other question, I'm afraid I don't have any solution to scroll the iframe into the form.

    However, there are two alternative solutions:

    1) Use PHP page instead of HTML page to embed your form. This would eliminate the need of the auto expand script, www and non-www problem, and there won't be any iframe at all, so there won't be any scrolling needed. (this is the best solution, I suggest to do this if possible)

    2) Set the "Redirect URL" of your form to your own custom thank you page. So that your clients won't need to scroll the iframe. (this is the simplest option)

    Posted 1 year ago #
  12. skyblue
    Member

    Thanks for explaining that it really helps.
    I am interested in placing the php in my page in order to avoid those problems. Do you have any resources/instructions you can share so that I can insert the php code?

    Thank you so much for your help!!

    Posted 1 year ago #
  13. simply rename your weightlossclinic.html file into weightlossclinic.php and then use the advanced form code (go to Embed Code and then choose Advanced Form Code).

    Posted 1 year ago #
  14. klaus789
    Member

    I'm having the same problem: when form editing is completed and i hit "continue", the user has to scoll up in order to confirm.
    I'm using iWeb - so I can't insert javascript and php code. Any other suggestions that can solve this problem?
    Thx! Klaus

    Posted 10 months ago #
  15. I think you can use the HTML Snippet widget using iWeb to insert Javascript code.
    I've updated the code on the first page, try to use the code here:
    http://www.appnitro.com/forums/topic/auto-expandadjustable-iframe?replies=34#post-3049

    Posted 9 months ago #
  16. Greetings Yuniar,
    I purchased your form system a while back and it works great. I just checked this page and found that you updated the auto expand script. I was wondering how to get it to work.
    Currently I use Jquery which is already in my <head>. It's being minified along with other scripts. So I don't think that the jquery is broken because all my other scripts are working just fine, and they're Jquery dependent.

    The other part of your code I put on my page (I'm using WordPress on code view) and nothing but the div shows up. it looks like this in the code:

    <div id="frame_marker" style="display:none"></div>

    here's the page: http://ikwebdesigner.com/contact/details/
    I currently have the regular iframe code on there. So if this was to work it would be duplicate forms, but the auto-expand-adjustable isn't showing up. I also tried your code without the standard iframe code on the page and still doesn't show up.

    I'm not sure what the problem is. All your help is appreciated.

    BTW: you helped me before by getting the PHP version of the embed code to work in WP. After WP upgraded to 3.1.1 it didn't work any more. So Now, I'll just use the iFrame version.

    Posted 9 months ago #
  17. Try to change this code:

    $("#frame_marker").after('<iframe height="1" id="my_iframe"
    allowTransparency="true" frameborder="0"
    scrolling="no" style="width:100%;border:none"
    src="" title="form">machform</iframe>');

    make them into a single line.

    Posted 9 months ago #
  18. Thanks Yuniar,
    Your suggestion worked! Your form system is by far the best.

    Posted 9 months ago #
  19. I thought I was having similar problem, going from form entry screen to review screen, I had to scroll up to see the review screen. But I found that this was only happening using Safari. I tested, IE, firefox, chrome, all worked fine placing the user at the top of the review screen. Anyone have any fixes for safari. I am using iframe embeded in page.

    cheers
    j

    Posted 9 months ago #
  20. jonb -- have you tried the new javascript code I've posted on the first page?

    Posted 9 months ago #

RSS feed for this topic

Reply »

You must log in to post.