Default URL of Hyperlink Manager

2 posts, 0 answers
  1. Susan
    Susan avatar
    137 posts
    Member since:
    Jul 2007

    Posted 18 Aug 2009 Link to this post

    Is there any way to default the value of the URL in the Hyperlink Manager? I have a standard URL and then the flle name appended to the end (which I know), so I would know the entire path without my user's having to enter it. Is there a way to do this?

    Also, would there be a way to default to 'Target' to 'New Window'?

    Thanks,
    Susan
  2. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 19 Aug 2009 Link to this post

    Susan,
    Follow the first 2 and 1/2 steps here (you want to stop at opening the LinkManager.ascx file) and then do a search for "http://" (the var 'href' is what you are looking for, I found it on line 109) and then just change the string to whatever you want.
    http://www.telerik.com/help/aspnet-ajax/disablingtabs.html
    For the default behavior of a link to be New Window you can do the following:

    <script type="text/javascript"
       function OnClientLoad(editor) 
       { 
           var links = editor.get_document().getElementsByTagName("A"); 
           for (var i = 0; i < links.length; i++) 
           { 
               var link = links[i]; 
               link.setAttribute("target", "#"); 
           }; 
        } 
    </script> 
    And then in the RadEditor tags set the attribute OnClientLoad="OnClientLoad", that should take care of it!
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top