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?
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.
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?
@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]
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?
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?
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.
Including the script manager in the template has solved the problem for me
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?
@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!
:)
is working on a reply...