This is a migrated thread and some comments may be shown as answers.

Rad Alert Text Not Showing New Line

1 Answer 996 Views
Window
This is a migrated thread and some comments may be shown as answers.
Tracy
Top achievements
Rank 1
Tracy asked on 11 May 2012, 04:12 PM
Hi,

I have the following script file.  In the text I am entering the \\n to display a new line but when the alert opens the text is not on a new line.  I have tried \n, \\n and \\n\r but none of these creates a new line.  How do I get a new line to display in the rad alert.

/*This function displays a confirm dialog box when the user clicks the delete button */
function DeleteOnClientClickingExternal(sender, args, radGrid) {   
    var MasterTable = radGrid.get_masterTableView();
    var selectedRows = MasterTable.get_selectedItems();
    if (selectedRows.length > 0) {
        var callBackFunction = Function.createDelegate(sender, function(argument) {
            if (argument) {
                this.click();
            }
        });
        var text = "This process CANNOT be un-done.\\nAre you sure you want to delete this record?.";
        radconfirm(text, callBackFunction, 500, 100, null, "Delete Record");
        args.set_cancel(true);

    }
    else {
        alert('You must select a row to be deleted.');
        args.set_cancel(true);
    }
}

Thank you for you help.

Tracy

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 14 May 2012, 08:46 AM
Hello Tracy,

Referring to this forum thread,the message can also parse HTML and "\n" will not produce a new line even. Please, use the <br/> tag instead which worked as expected.

Thanks,
Shinu.
Tags
Window
Asked by
Tracy
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or