Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ryan 4 posts 24 karma points
    Jun 29, 2011 @ 20:06
    Ryan
    0

    Form in jQuery Dialog error

    I'm attempting to load a basic Contour contact form in a jQuery dialog box.  I did my initial development on Umbraco 4.6 and Contour 1.1.6 and I was able to get everything working fine.  I have since upgraded to Umbraco 4.7 and Contour 1.1.8 and now I'm getting an error when the form is loaded in the jQuery dialog.  The error is:

    Uncaught Sys.InvalidOperationException: Sys.InvalidOperationException: The PageRequestManager cannot be initialized more than once.

    Any ideas as to what could be causing the problem?

  • Ryan 4 posts 24 karma points
    Jun 29, 2011 @ 21:47
    Ryan
    0

    I've narrowed the problem down a bit.  It seems to occur any time the form is moved, using append(), appendTo(), html(), or similar.  Any ideas?

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Jun 30, 2011 @ 13:09
    Tim
    0

    I think we ran into this. We ended up having the form in an iFrame within the jQuery dialog box (we used FancyBox IIRC). That worked correctly and we were able to track the forms separately in analytics (so we could see how many people opened the form). We could also interact with the parent frame using jQuery, so we could close the popup etc.

  • jayanthi 66 posts 86 karma points
    Jul 08, 2011 @ 11:14
    jayanthi
    0

    Including the script manager in the template has solved the problem for me

  • Ryan 4 posts 24 karma points
    Jul 12, 2011 @ 22:41
    Ryan
    0

    My problem actually ended up being that the form wasn't getting posted back into the proper place on the page.  I still get the error, but it's not affecting the functioning of the form.

    Tim - I considered going the iFrame route, but I have the form on multiple pages and I need to capture the pageId whenever it's submitted.  Is there a way to do that using an iFrame?

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Jul 14, 2011 @ 13:36
    Tim
    0

    @Ryan, Yes! You can pass in a parameter on the querystring to the iFrame, and then have a hidden field that contains the value from the querystring. To pass that value in to the hidden field, set it's default value to  [@KEYNAME HERE] replacing the caps text with the name of the querystring variable. So for exmaple if your querystring variable was "pageId" the text to put in the default value field would be: [@pageId]

    Hope that helps!

    :)

Please Sign in or register to post replies

Write your reply to:

Draft