NavigateURL javascript bug

11 posts, 1 answers
  1. Dejan
    Dejan avatar
    10 posts
    Member since:
    Apr 2009

    Posted 26 May 2009 Link to this post

    We have Asp.net ajax 2009 Q1 SP1 on our server and developer machine.
    On client click of the button that has NavigateURL property set to (e.g.) 
    rtb.NavigateUrl = "javascript:alert('Hello World');"; it will execute it twice. In your examples you have trial dll that is form February 2008 and our dll is release version from January 2009. Is there a solution / patch for this behaviour? Thanks. Dejan

  2. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 26 May 2009 Link to this post

    Hi Dejan,

    We tried to repro the reported issue using the latest internal build of the controls, but to no avail. Please find below a sample code snippet that we used for our test. Let us know what's different in your case.

    ASPX:
    <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server">  
        </asp:ScriptManager> 
        <telerik:RadToolBar ID="RadToolBar1" runat="server">  
            <Items> 
                <telerik:RadToolBarButton runat="server" Text="Button 0">  
                </telerik:RadToolBarButton> 
                <telerik:RadToolBarButton runat="server" Text="Button 1">  
                </telerik:RadToolBarButton> 
            </Items> 
        </telerik:RadToolBar> 
        </form> 

    Code-behind:
    using System;  
    using System.Collections.Generic;  
    using System.Linq;  
    using System.Web;  
    using System.Web.UI;  
    using System.Web.UI.WebControls;  
    using Telerik.Web.UI;  
     
    public partial class _Default : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            RadToolBarButton but = (RadToolBarButton)RadToolBar1.FindItemByText("Button 0");  
            but.NavigateUrl = "javascript:alert('Hello World');";  
        }  
    }  
     

    All the best,
    Paul
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dejan
    Dejan avatar
    10 posts
    Member since:
    Apr 2009

    Posted 26 May 2009 Link to this post

    Paul,
    Thanks for your reply.

    I have tested your code and it is ok ONLY if I use DLL (and corresponding XML file) (Telerik.Web.UI.dll) that your team is using to deploy sample code (Trial Version - file version 2008.2.1001.35; size 11,9 MB; Date Modified 30.9.2008 14:33)
    If I run your example with our Fully licensed version DLL (file version 2009.1.402.35; size 12,5 MB; date modified 6.4.2009 11:09) then the issue reappears.

    Regards

    Dejan

  5. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 26 May 2009 Link to this post

    Hello Dejan,

    Could your please what is this 'sample code' that you are talking about? In addition the provided code snippet is tested with the latest version of RadControls for ASP.NET AJAX - 2009.1.402.35. The other version that you mentioned (2008.2.1001.35) is pretty old, so the sample code might not work with it.

    I think it will be best if you can open a support ticket and send us a simple running project (incl. CSS, images, skins, DB backup if needed and so on) demonstrating the problem (and step-by-step instructions on doing so). In that way we can reproduce and pinpoint the problems you're facing on our side, understand the logic of your application and provide a solution.

    Thanks beforehand for your patience and cooperation,
    Paul
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Dejan
    Dejan avatar
    10 posts
    Member since:
    Apr 2009

    Posted 26 May 2009 Link to this post

    Paul,

    If you open this tread (http://www.telerik.com/community/forums/aspnet-ajax/toolbar/problem-with-navigateurl-and-imageurl-together.aspx) and in LAST reply open attached zip example, you will find Trial version DLL. I have used that one to test your code. In the bin folder i have copied DLL and XML file and made a reference to my test project. As simple as that. With that DLL works fine. Then replaced trial DLL and XML with our licensed DLL (details described in my previous post) and the odd behaviour started. Replaced DLL back to “Trial” and it is ok again....

    So the issue is not in the code but in the code in the DLL we have. Can you please try to find DLL version we have and test your code with it? I can mail the copy of our DLL to you if you want.

     

    Regards

    Dejan

  7. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 27 May 2009 Link to this post

    Hello Dejan,

    Please find attached a sample web application based on the mentioned sample, but it uses the Latest Internal Build of RadControls for ASP.NET AJAX.

    Sincerely yours,
    Paul
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  8. Dejan
    Dejan avatar
    10 posts
    Member since:
    Apr 2009

    Posted 27 May 2009 Link to this post

    Paul,

    Does that mean that SP2 due to be released by the end of this week will have fix for this issue included?

    Regards

    Dejan
  9. Answer
    Paul
    Admin
    Paul avatar
    4281 posts

    Posted 27 May 2009 Link to this post

    Hello Dejan,

    Yes, the provided code sample will work fine with SP2.

    Best wishes,
    Paul
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  10. Sergey
    Sergey avatar
    5 posts
    Member since:
    May 2009

    Posted 27 May 2009 Link to this post

    Just click Help button here
    http://demos.telerik.com/aspnet-ajax/toolbar/examples/functionality/firstlook/defaultcs.aspx

    NavigateUrl will open in new window and in parent window
  11. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 27 May 2009 Link to this post

    Hi Sergey,

    As already stated, you will have to download the Latest Internal Build of RadControls for ASP.NET AJAX, or wait for SP2 to be released later today. The online demos now use the latest official build (2009.1.402), but they will be updated to SP2 later today too. In a word, the mentioned issue will be fixed in the mentioned example later today.

    Kind regards,
    Paul
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  12. Dejan
    Dejan avatar
    10 posts
    Member since:
    Apr 2009

    Posted 02 Jun 2009 Link to this post

    Paul,

    We have installed SP2 today and this issue is solved as you stated.

    Thanks for your assistance.

    Dejan

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017