This is a migrated thread and some comments may be shown as answers.

RadAjax Q3 2007 problem

3 Answers 138 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Roy Gelerman
Top achievements
Rank 1
Roy Gelerman asked on 14 Jan 2008, 10:42 PM

There is a bug with RadAjax Prometheus in that it is erroneously creating new <link> elements on an ajax response.  (in IE7 if any client javascript code then loops through the stylesheets the poorly formed css HREF's result in "Access denied" errors, which is how I stumbled upon this)

You can verify this by creating a simple .aspx page, putting a button, a hidden  field and a prometheus RadAjaxManager on the page. Have the button update the hidden field via RadAjaxManager.  Start the page and use Fiddler (http://www.fiddlertool.com/fiddler/) or another HTTP debugger to watch the requests. Click the button. On the reponse, new <link> elements will be created with bad hrefs that generate HTTP 404 responses from the web server.


A brief technical description:

RadManager renders something similar to the following at the end of its AJAX reponse:

Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadAjaxManager, {"ajaxSettings":[{InitControlID : "Button1",UpdatedControls : [{ControlID:"HiddenField1",PanelID:""}]}],"clientEvents":{OnRequestStart:"",OnResponseEnd:""},"defaultLoadingPanelID":"","enableAJAX":true,"enableHistory":false,"links":[],"styles":[],"uniqueID":"RadAjaxManager1"}, null, null, $get("RadAjaxManager1"));

Note the lowercase "links" ( this is a comma delimited list of <link> element hrefs,which in this case is empty)


In it's WebResource.axd javascript, RadAjaxManager does this,

var _b=_a.substr(_a.indexOf("\"Links\":")+10,_a.indexOf("]",_a.indexOf("\"Links\":"))-(_a.indexOf("\"Links\":")+10)).replace(/\"/g,"");

Note the capital L in "Links", indexOf will return -1 since there is no match. And then adds 10 to this to start the substring.  The script then goes on to split the resulting string on commas.  This yields an array of strings like

"cation.add_init(function() { $create(Telerik.Web.UI.RadAjaxManager"
" {ajaxSettings:[{InitControlID : Button1"
"UpdatedControls : [{ControlID:HiddenField1"
"PanelID:}"

It then, since it cannot find these in the document, creates <link> elements with these strings as the HREF's.


3 Answers, 1 is accepted

Sort by
0
Roy Gelerman
Top achievements
Rank 1
answered on 16 Jan 2008, 10:20 PM

Looking at the 1/15/2008 release notes it looks like it will fix this

 

What’s New in RadControls “Prometheus” for ASP.NET Q3 2007 SP1 (Version Number 2007.3.1314):

RadAjax

What’s Fixed

  1. Invalid HTTP requests are no longer generated on parsing the response of an Ajax request.
0
Sebastian
Telerik team
answered on 17 Jan 2008, 01:32 PM
Hi Roy,

Please migrate to the Q3 2007 SP1 release of RadControls Prometheus to see whether this solves your issue. Let us know whether everything is OK after the update.

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Roy Gelerman
Top achievements
Rank 1
answered on 18 Jan 2008, 06:25 PM


Problem seems to be resolved in SP1. Thank you.
Tags
Ajax
Asked by
Roy Gelerman
Top achievements
Rank 1
Answers by
Roy Gelerman
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or