This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 3

Embed code causing FireFox to "freeze" on page load


  1. maperformance
    Member

    I have a MF3.3 form embedded on a page in our X-cart store, which uses Smarty templates. We have a form in a hide/show DIV below the description to allow people to submit a product update/fix if they see something wrong. Here is the code I'm embedding:

    <tr>
        	<td colspan="3">
            	<a href="#feedback" class="show_hide" style="color:#0965ab;">Spot an error? Help us improve this listing.</a>
    			<div class="slidingDiv">
                	<script type="text/javascript">
    				var __machform_url = 'http://www.maperformance.com/forms/embed.php?id=15&element_4={$product.productid}';
    				var __machform_height = 425;
    				</script>
    				<div id="mf_placeholder"></div>
    				<script type="text/javascript" src="http://www.maperformance.com/forms/js/jquery.min.js"></script>
    				<script type="text/javascript" src="http://www.maperformance.com/forms/js/jquery.ba-postmessage.min.js"></script>
    				<script type="text/javascript" src="http://www.maperformance.com/forms/js/machform_loader.js"></script>
                </div>
            </td>
        </tr>

    The "{$product.productid}" is a hidden element on the form to show us which product the form is being submitted from without user interaction. On some Firefox 16.x installations around the shop here, people have a multi-second freeze of their browser when loading any product page on our site. Note, this does not happen on all installs of FF 16.x (my PC does not do this). When I comment out this code form the product display template the page freezes go away so I know it's this code causing it.

    How can I eliminate this?

    Posted 12 years ago #
  2. yuniar

    Can you let me know the URL to your page please? I'll check it.


    MachForm Founder

    Posted 12 years ago #
  3. maperformance
    Member

    I don't currently have it installed due to the problem it causes. I can re-enable it for a short time for troubleshooting but I'd need to know more precisely when you may have a chance to take a look. I hope you understand :)

    Posted 12 years ago #
  4. maperformance
    Member

    OK, here's one for you:
    http://www.maperformance.com/careers-at-map.html

    This code is used to embed the form:

    <script type="text/javascript">
    var __machform_url = 'http://www.maperformance.com/forms/embed.php?id=7';
    var __machform_height = 3548;
    </script>
    <div id="mf_placeholder"></div>
    <script type="text/javascript" src="http://www.maperformance.com/forms/js/jquery.min.js"></script>
    <script type="text/javascript" src="http://www.maperformance.com/forms/js/jquery.ba-postmessage.min.js"></script>
    <script type="text/javascript" src="http://www.maperformance.com/forms/js/machform_loader.js"></script>
    Posted 12 years ago #
  5. yuniar

    Sorry for the delay on this. I've checked the page and from what I see, it seems there is some conflict with the Javascript library.
    MachForm uses jQuery and your X-Cart template seems to be using jQuery as well.

    Try to use the iframe embed code instead of the Javascript code.
    Let me know how it goes.

    Also, I'm not quite familiar with X-Cart, but is it possible to insert php code into the page? If this is possible, you might want to use the PHP embed code to use the form. The php code should load your form very quick.


    MachForm Founder

    Posted 12 years ago #

RSS feed for this topic

Reply