| <script type="text/javascript"> |
| function openRadWindow() |
| { |
| var oWnd = window.radopen("Window1.aspx", null); |
| oWnd.setSize(700,700); |
| oWnd.set_title = "test"; |
| oWnd.set_skin = "Office2007"; |
| } |
| </script> |
| Protected Sub chkTasks_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) | |
| Dim Today As Date | |
| Today = Now() | |
| Dim chkBox As CheckBoxList = CType(sender, CheckBoxList) | |
| Dim myPanel As Panel = CType(chkBox.Parent, Panel) | |
| Dim dataItem As GridDataItem = CType(myPanel.NamingContainer, GridDataItem) | |
| If chkBox.SelectedValue <> "" Then | |
| dataItem("FileName").Style("color") = "orange" | |
| Dim file As Integer = dataItem("FileId").Text | |
| Dim Task As Integer = chkBox.SelectedValue | |
| Dim Ext As RadComboBox = TryCast(dataItem.FindControl("cmbxExtension"), RadComboBox) | |
| Dim Extension As Integer = Int32.Parse(Ext.SelectedValue) | |
| Dim strSQL As String = _ | |
| "INSERT INTO tblBewerkingToFile " & _ | |
| "(FileId, BewerkingId, ExtensionFormat) " & _ | |
| "VALUES " & _ | |
| "(@FileId, @BewerkingId, @ExtensionFormat)" | |
| Dim Command As New SqlCommand(strSQL) | |
| Command.Parameters.AddWithValue("@FileId", file) | |
| Command.Parameters.AddWithValue("@BewerkingId", Task) | |
| Command.Parameters.AddWithValue("@ExtensionFormat", Extension) | |
| DBPortal.Execute(Command) | |
| End If | |
| Dim previewControl As Control = FindPageControl("previewControl") | |
| Dim NoResults As Label = previewControl.FindControl("lblNoChoice") | |
| NoResults.Visible = False | |
| Dim ValidResults As Repeater = previewControl.FindControl("rpValidBewerking") | |
| ValidResults.Visible = True | |
| End Sub | |


if (Parent.Page.ClientScript.IsClientScriptBlockRegistered(AddressScriptName))
Parent.Page.ClientScript.RegisterClientScriptBlock(
this.GetType(), AddressScriptName, MakeScript());
m_rwAddressLookups.ClientCallBackFunction =
"CallBackFromAddressFunction" + AddressScriptName;
m_btnAdressLookup.Attributes.Add(
"onclick", "return ShowAddressLookupDialog" + AddressScriptName + "();");
private string AddressScriptName{
get { return "AddressScript" + this.ClientID; }
}
private string MakeScript()
{
return @"<script type='text/javascript'>
function ShowAddressLookupDialog"
+ AddressScriptName + @"()
{
var manager = $find('<%=m_rwmAddressLookups.ClientID %>');
manager.open(null, 'm_rwAddressLookups');
return false;
}
function CallBackFromAddressFunction"
+ AddressScriptName + @"(radWindow, returnValue)
{
var oArea = document.getElementById('<%=m_tbAddressId.ClientID %>');
if (returnValue)
{
oArea.innerText = returnValue.toString();
oArea.onchange();
}
}
</script>"
;
}
WHen I click the address lookup button the onclick event complains Object Expected on bolded function:
<
input type="submit" name="ctl00$ContentPlaceHolder1$m_contactAddressEdit$m_btnAdressLookup" value="Lookup Address" onclick="return ShowAddressLookupDialogAddressScriptctl00_ContentPlaceHolder1_m_contactAddressEdit();WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentPlaceHolder1$m_contactAddressEdit$m_btnAdressLookup", "", true, "", "", false, false))" id="ctl00_ContentPlaceHolder1_m_contactAddressEdit_m_btnAdressLookup" class="FormButton" />
Appears that it does not find the client id qualified script function.
Any ideas?