Automatically deselect links that have target="_blank"

1 posts, 0 answers
  1. John
    John avatar
    5 posts
    Member since:
    Jul 2012

    Posted 21 May 2010 Link to this post

    I thought I'd share some javascript code that will automatically deselect a click on a link that has target="_blank" since it is a popup window.  Put in OnClientItemClicked="RadPanelBarClicked" your RadPanelBar declaration.

    function
    RadPanelBarClicked(sender, eventArgs) {

     

     

    // Dont' select links with target.

     

     

     

    var item = eventArgs.get_item();

     

     

    var target = item.get_target();

     

     

    if (target)

     

    {

    item.set_selected(

    false);

     

    }

    }

Back to Top