Hi
I hope someone can help - I think I am list in syntax issues with this.
Trying to use showWindow(url) method to pass a record ID to the window.
I have this column in a radgrid:
and my javascript and window declaration:
The problem is 'the server tag is not well formed' at runtime. I tried replacing the regular apostrophes inside the showWindow('....') with a different type of apostrophe (`), which removed the runtime error message, but the link does not do anything when clicked.
Please help me out of the syntax (I think) mire!
Thanks
Clive
I hope someone can help - I think I am list in syntax issues with this.
Trying to use showWindow(url) method to pass a record ID to the window.
I have this column in a radgrid:
| <telerik:GridTemplateColumn DataField="ID" DataType="System.Int32" SortExpression="ID" UniqueName="ID"> |
| <ItemTemplate> |
| <asp:HyperLink ID="HyperLink1" runat="server" |
| NavigateUrl='<%# "javascript:onclientclick=showWindow('../podcast-player/play-podcast.aspx?ID=" & Eval("ID") & "');" %>'>Listen</asp:HyperLink> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
and my javascript and window declaration:
| <script type="text/javascript" language="javascript"> |
| function showWindow(url) { |
| var oWnd = $find("<%=RadWindow1.ClientID%>"); |
| oWnd.setUrl(url); |
| oWnd.show(); |
| } |
| function OnClientClose(oWnd) { |
| oWnd.setUrl("about:blank"); // Sets url to blank |
| } |
| </script> |
| <telerik:RadWindow ID="RadWindow1" runat="server" Skin="Vista" Behaviors="Move,Close,Resize" VisibleStatusbar="False" |
| Animation="Fade" Height="170px" Width="280px" |
| OnClientClose="OnClientClose"> |
| </telerik:RadWindow> |
The problem is 'the server tag is not well formed' at runtime. I tried replacing the regular apostrophes inside the showWindow('....') with a different type of apostrophe (`), which removed the runtime error message, but the link does not do anything when clicked.
Please help me out of the syntax (I think) mire!
Thanks
Clive