Global or default target= attribute for links

Last post 12-18-2006, 5:57 PM by stevehaffner. 2 replies.
Sort Posts: Previous Next
  •  12-18-2006, 3:28 PM 25203

    Global or default target= attribute for links

    When I create links without a target parameter, and I create text with embedded links in CuteEditor, the embedded links target the CuteEditor window, rather than the browser top level. I don't want my editors to have to remember to set the target attibute in all of their embedded links.
     
    Is there a way to set a default or global target parameter to be applied to all embedded links?
     
    Thanks!
  •  12-18-2006, 4:33 PM 25206 in reply to 25203

    Re: Global or default target= attribute for links

    >>I create text with embedded links in CuteEditor, the embedded links target the CuteEditor window,
     
    By default, Cute Editor will create link like:
     
    <a href="http://yahoo.com"> Yhaoo.com </a>
     
    If you want to change to:
     
    <a href="http://yahoo.com" target="_top"> Yhaoo.com </a> or
     
    <a href="http://yahoo.com" target="_parent"> Yhaoo.com </a>
     
    Please follow the steps below:
     
    1. Find/open CuteSoft_Client\CuteEditor\Dialogs\Tag\tag_a.ascx file
     
    2. Find the following code:
     

        <SELECT id="inp_target" NAME="inp_target">
         <OPTION value="">[[NotSet]]</OPTION>
         <OPTION value="_blank">[[Newwindow]]</OPTION>
         <OPTION value="_self">[[Samewindow]]</OPTION>
         <OPTION value="_top">[[Topmostwindow]]</OPTION>
         <OPTION value="_parent">[[Parentwindow]]</OPTION>
        </SELECT>
     
    3. Change it to:
     
    <input type="hidden" id="inp_target" value="_top">
     
     
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  12-18-2006, 5:57 PM 25211 in reply to 25206

    Re: Global or default target= attribute for links

    Thanks, Adam. Your solution works for the case where editors enter links into their content using the CuteEditor link button, which covers the majority of uses in my situation. But I get the same undesired behavior for "inherited" HTML that does not have the target attribute set properly. My editors will still have the option of entering anchors manually in the HTML mode, and they will need to be made aware that they must set the target=_top attribute in order for their content to behave properly.
     
    It would be very helpful to have a global DefaultTarget=_top attribute for the CuteEditor control that would be in effect when the anchor does not have a target attribute specified. I do not understand why/how somebody would use a DefaultTarget=_self, which seems to be the behavior at present.
     
    Things are looking good, and I think we will be embedding in our site released to our customer.  I can't tell you how much I appreciate the quick reply.
     
    Steve Haffner
View as RSS news feed in XML