Problem with NavigateUrl and ImageUrl Together

9 posts, 0 answers
  1. Jim Johnstone
    Jim Johnstone avatar
    5 posts
    Member since:
    Nov 2007

    Posted 22 Apr 2008 Link to this post

    I have just started using the RadToolBar from the Q1 2008 release.  It seems that when I set both the ImageUrl and the NavigateUrl for a RadToolBarButton, no navigation happens when the button is clicked on.  If I only have Text, the Navigate works properly.

    Any ideas?

    Thanks!

    Jim
  2. Erjan Gavalji
    Admin
    Erjan Gavalji avatar
    1455 posts

    Posted 23 Apr 2008 Link to this post

    Hi Jim,

    I just checked that and I was not able to reproduce the problem. Please, find attached the page I used. Can you please, check if I am missing something?

    Kind regards,
    Erjan Gavalji
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jim Johnstone
    Jim Johnstone avatar
    5 posts
    Member since:
    Nov 2007

    Posted 23 Apr 2008 Link to this post

    Erjan,

    I have the same problem with your example.  I did dig further and if the click on the button is not right on the actual image, then it works.  So, in your example, if I click right on the green box, nothing happens.  If I click on the text Telerik or if I click just outside the green box, it works.  Also, FireFox appears to work just fine in all cases.  I am having the problem in both IE6 and IE7.

    Any help is appreciated.

    Jim
  5. Erjan Gavalji
    Admin
    Erjan Gavalji avatar
    1455 posts

    Posted 23 Apr 2008 Link to this post

    Hi Jim,

    I'm sorry for misleading you in my previous post. It seems that I tested using a version of the Telerik.Web.UI suite, different than the official one. Indeed, we isolated the bug and we are working on fixing it. Let me know if you'd like an earlier fix and I will send it to you once ready (for a developer version, please, open a formal support ticket).

    P.S. Your Telerik account is updated.

    Kind regards,
    Erjan Gavalji
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 25 Apr 2008 Link to this post

    Hello Jim Johnstone,

    As a temporary solution, you could add the following script to your page:
    <script type="text/javascript"
    function pageLoad() 
        function navigateAction() 
        { 
            if (window.event.srcElement.tagName == "IMG"
            { 
                var link = this.parentNode.parentNode.parentNode.parentNode; 
                 
                link.click(); 
            } 
        }; 
         
        if ($telerik.isIE) 
        { 
            var toolbar = $find('<%= radToolBar2.ClientID %>'); 
             
            var items = toolbar.get_items(); 
             
            for (var i = 0, len = items.get_count(); i < len; i++) 
            { 
                var item = items.getItem(i);  
                             
                if (Telerik.Web.UI.RadToolBarButton.isInstanceOfType(item)) 
                { 
                    var url = item.get_navigateUrl(); 
                    var img = item.get_imageElement(); 
                     
                    if (img && url != "#" && url != "none"
                    { 
                        img.onclick = navigateAction; 
                    } 
                } 
            } 
        } 
    </script> 

    This will cause the image to delegate the js event (that it doesn't).

    Best wishes,
    Alex
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. Maxime
    Maxime avatar
    12 posts
    Member since:
    Aug 2008

    Posted 19 Aug 2008 Link to this post

    Hi,

    I'm using Q2 and still have the same issue, is it normal this hasn't been fixed yet? (note this seems to be fine in IE7, but still isn't working in IE6)


    And by the way, the code supplied bellow doesn't work for me, but i'm using this in a master page... the controls ids are fine..., it doesn't seem to be called at all... or plainly just not working :(
  8. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 20 Aug 2008 Link to this post

    Hi Maxime,

    Could you please open a support ticket and attach a sample solution that demonstrates the problem so that we can investigate it?

    All the best,
    Alex
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  9. thepilsbury
    thepilsbury avatar
    36 posts
    Member since:
    Jan 2007

    Posted 16 Oct 2008 Link to this post

    Has this been resolved?

    I am using the latest build and have the same behaviour in IE7 under Windows Server 2003. Clicking on the text works.. clicking on the image doesn't.
  10. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 17 Oct 2008 Link to this post

    Hello,

    We tried to reproduce the problem locally with the latest official version - Q2 2008 SP2, but couldn't. Please find attached a sample project as part of our local tests(it contains trial dll's).

    Could you test it at your side? Does it work?

    If your case is different could you modify our project so we to be able to reproduce the problem?

    Regards,
    Helen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017