Linefeed or Carriage Return issues

2 posts, 1 answers
  1. SDI
    SDI avatar
    107 posts
    Member since:
    Nov 2011

    Posted 02 Jan 2012 Link to this post

    Hello Telerik,

    I am using the RadWindow for displaying some RadConfirms, but the coding doesn't seem to support \r or \n.
    
    
    <telerik:RadWindowManager runat="server" ID="RadWindowManager1" EnableShadow="true"  />

    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    <script type="text/javascript">
    //![CDATA[
    var myName = myMasterTable.get_selectedItems()[0].getDataKeyValue( 'Name' );
    var myPrompt = "Are you sure you want to delete this program?\r\n\r\n";
    alert( myPrompt + myName );
    radconfirm(myPrompt + myName, ConfirmProgramDeleteCallBackFn, 330, 100, null, 'Delete Program?' );

    The "alert" shows fine, with "myName" being a spaced below the "myPrompt", but not the RadWindow the "myName" value appears after the "...program?", no linefeeds. Does it have to be coded some different way?

    Thanks!
    SDI


  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 02 Jan 2012 Link to this post

    Hello,

    radalert() accepts Html as a string, so you can use the break tag to insert new line
    e.g.  radalert(msg1+"<br/>"+msg2);

    Thanks,
    Princy.
Back to Top