Hi Helen,
I've designed a simple test page to try and see where the error is coming from.
All I have is a basic Page (menu item) with a blank Simple template (one zone only) with no inheritance.
I've called it test.aspx.
On the page (test.aspx) I've placed a StaticHTML webpart that contains:
<div id="mycontent">loading</div>
and a link to my javascript file:
<script type="text/javascript" src="myfiles/js.js"></script>
That javascript file (js.js) has only the following code:
jQuery(document).ready(function($) {
$('#mycontent').load("text.aspx");
});
In the page to load via the javascript above (text.aspx) there is just an EditableText webpart containing some basic HTML text.
Back in test.aspx I've also added an EditContribution webpart. Setting the "Allow editing by users" to All.
So test.aspx had 2 webparts (StaticHTML & EditableText), and text.aspx has one webpart (EditableText).
To keep things simple I added the CMS.GlobalHelper.ScriptHelper.RegisterJQuery(Page); code to eliminate any duplicate jQuery file links into the StaticHTML webpart code file: \CMSWebParts\Text\staticHTML.ascx.cs. At the end of the SetupControl() function.
Apart from that, I have no other webparts or custom code.
When I browse to test.aspx the jQuery works correctly and loads in the HTML content from text.aspx into the DIV "mycontent".
The problem comes when I try and click on the "Edit" link of the EditContribution webpart. I instantly get an error and the editbox fails to appear.
The error in Firefox4 Error Console translates as:
Error: too much recursion
Source File: http://localhost/testwebsite/WebResource.axd?d=--o-Y99KJIeMrb-EOiGpBNgAwf0hCGmDZo1vgTPc0xgb_jwE8ymBS0VVF7Fw2JLFmpTRr_zsQ8DlUnelfz6Zew73TcY1&t=634210400612724343
Line: 350
The error in IE8 translates as:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C)
Timestamp: Fri, 17 Jun 2011 08:58:30 UTC
Message: 'theForm.__SCROLLPOSITIONX' is null or not an object
Line: 252945047
Char: 5
Code: 0
URI: http://localhost/testwebsite/test.aspx
I don't know if you can recreate this error?
The CMS version I'm running is: 4.1 Build : 4.1.3518
Thanks,
Tim