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

Set window content via JS

1 Answer 49 Views
Window
This is a migrated thread and some comments may be shown as answers.
Nik
Top achievements
Rank 1
Nik asked on 14 Sep 2011, 09:38 PM
Is there any way I can open a rad window with JS that would show the contents of a html coded JS string, instead of directing it to a URL?

1 Answer, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 2
answered on 15 Sep 2011, 01:06 PM
Hello Nik,

You could used the ContentTemplate of the RadWindow and add a div that you can then populate using JS. Like so:

<telerik:RadWindow id="RadWindow1" runat="server">
     <ContentTemplate>
          <div id="windowContent">
          </div>
     </ContentTemplate>
</telerik:RadWindow>

Your JS would then be something like this:

document.getElementById("windowContent").innerHTML = "<strong>bolded text</strong>";

I hope that helps.
Tags
Window
Asked by
Nik
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 2
Share this question
or