I have a RadComboBox with two values. I want to select a value from the combobox, then click a submit button. When I do this, I want a RadWindow to open and for the SelectedValue of the combobox item to be passed to the RadWindow.
Here is the code for my JS function
<script type="text/javascript">
function OpenPositionedWindow(oButton, url, windowName)
{
var oWnd = window.radopen(url,windowName);
}
function openRadWindow(ContractID)
{
var oWnd = radopen("ContractAddContractBlock.aspx?ContractID=" + ContractID, "AddBlock" );
oWnd.Center();
}
</script>
Here is the code for the combobox
<telerik:RadComboBox ID="RadComboBox1" Runat="server"
RadComboBoxImagePosition="Right">
<Items>
<telerik:RadComboBoxItem runat="server" Text="Test1" Value="1" />
<telerik:RadComboBoxItem runat="server" Text="Test2" Value="2" />
</Items>
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
<ExpandAnimation Type="OutQuart"></ExpandAnimation>
</telerik:RadComboBox>
Here is the code for my button
<asp:Button ID="Button1" OnClick="openRadWindow('<%# radcomboxbox1.selectedvalue %>'); return false;" runat="server" Text="Button" />
When I run it, I get
BC30456: 'openRadWindow' is not a member of 'ASP.test_aspx'.
This is the only article I found relative to my problem but due to its age I don't know if it is still relevant.
http://www.telerik.com/community/forums/thread/b311D-babeg.aspx
Am I going at this the right way? It seems like my problems is all in the OnClick of the button, but I'm just not sure why. I have tried a standard HTML button as well so it would be all client-side, but I get a similar error.
Thanks.