This is a migrated thread and some comments may be shown as answers.
Linefeed or Carriage Return issues
1 Answer 45 Views
This is a migrated thread and some comments may be shown as answers.
SDI
Top achievements
Rank 1
SDI asked on 02 Jan 2012, 09:47 PM
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


1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 1
answered on 03 Jan 2012, 05:13 AM
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.
Asked by
SDI
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Share this question
or