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

NavigateURL javascript bug

10 Answers 105 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Dejan
Top achievements
Rank 1
Dejan asked on 26 May 2009, 07:04 AM

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

10 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 26 May 2009, 01:55 PM
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.
0
Dejan
Top achievements
Rank 1
answered on 26 May 2009, 02:09 PM

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

0
Paul
Telerik team
answered on 26 May 2009, 02:17 PM
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.
0
Dejan
Top achievements
Rank 1
answered on 26 May 2009, 02:34 PM

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

0
Paul
Telerik team
answered on 27 May 2009, 06:22 AM
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.
0
Dejan
Top achievements
Rank 1
answered on 27 May 2009, 07:01 AM
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
0
Accepted
Paul
Telerik team
answered on 27 May 2009, 07:28 AM
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.
0
Sergey
Top achievements
Rank 1
answered on 27 May 2009, 09:40 AM
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
0
Paul
Telerik team
answered on 27 May 2009, 10:21 AM
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.
0
Dejan
Top achievements
Rank 1
answered on 02 Jun 2009, 06:24 AM

Paul,

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

Thanks for your assistance.

Dejan

Tags
ToolBar
Asked by
Dejan
Top achievements
Rank 1
Answers by
Paul
Telerik team
Dejan
Top achievements
Rank 1
Sergey
Top achievements
Rank 1
Share this question
or