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

[Solved] AjaxRequest on a MasterPage

4 Answers 378 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
cyberzed
Top achievements
Rank 2
cyberzed asked on 08 Apr 2008, 01:57 PM
I am currently working on a light edition of our website, and this is developed in Prometheus.

In the old version we were able to do AjaxRequests from the master page due to using
<%=ajaxManager.ClientID%>.AjaxRequest(...) 

But after this upgrade to Prometheus I can't really find a way to do anything like it. I have tried

$find('<%=ajaxManager.ClientID%>').ajaxRequest(...) 

didn't work :( tried
$find( '<%=RadAjaxManager.GetCurrent(this).ClientID%>' ).ajaxRequest(...) 

doesn't work either since the page is a master page and not a "Page" class.

Can't find any subjects on this and I can't find any threads that shoots this option to the ground either...Is it completely impossible to do a AjaxRequest from the masterpage in Prometheus or?

4 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 08 Apr 2008, 02:03 PM
Hi cyberzed,

You can look at the code snippet/demo I've just posted here:

http://www.telerik.com/community/forums/thread/b311D-bchhec.aspx

Sincerely yours,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
cyberzed
Top achievements
Rank 2
answered on 08 Apr 2008, 02:15 PM
Doesn't really help me in anyway since that concerns calling AjaxRequest from a content page and not the master page as I asked about ;)

Goal is: calling AjaxRequest from a javascript block on the masterpage and let the masterpage-codebehind-implemented handler sort the stuff that the request sends to it

Don't concern any content pages at all.
0
Accepted
Konstantin Petkov
Telerik team
answered on 10 Apr 2008, 01:10 PM
Hello cyberzed,

Did you manage to find the proper syntax? There is no difference if you call ajaxRequest from the content or master page that's why I referred the other example.

You will find the updated one attached. The AJAX request can be triggered like this:

        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
            <script type="text/javascript"
                function myContentClickHandler() 
                { 
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("content"); 
                } 
            </script> 
        </telerik:RadCodeBlock> 

Let us know if you need further assistance.

All the best,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
cyberzed
Top achievements
Rank 2
answered on 10 Apr 2008, 02:07 PM
Hmm this is almost to annoying for me to write..

Worked fine...compared some stuff and found the missing "return false;" plus I needed to add a setTimeout since I keept getting "Error: 'null' is null or not an object".

Using onload and resize to measure an IFrame my content is rendered in.
Tags
Ajax
Asked by
cyberzed
Top achievements
Rank 2
Answers by
Konstantin Petkov
Telerik team
cyberzed
Top achievements
Rank 2
Share this question
or