Hello,
I'm trying to put a webdialog on a user control (.ascx) and then use that in a .aspx page. The $find method fails to find the webdialog when I call it like so:
<input type="button" value="Show (Client Side)" onclick="$find('confirmDelete').show();" />
"confirmDelete" is the name of my web dialog. I have another page pretty much identical except that all the code that's in the ascx control, is right on the .aspx page and it works fine.
-Eric
I'm not sure, but it could be that the web dialog's name is different when rendered to the page since it's within another control.. I'd recommend you to take a look at the generated code (right click on the page and then 'View source code' trying to find out what the name of the web dialog is.
I ran the solution in VS and then opened TestCallingTestWebDialogControl.aspx in Script Documents/Windows Internet Explorer
Looks like it might be "incTestWebDialog_confirmDelete_clientState"
<input type="hidden" id="incTestWebDialog_confirmDelete_clientState" name="incTestWebDialog_confirmDelete_clientState" /><div class="ig_Control igdw_Control :=CtlMain:layout" id="incTestWebDialog_confirmDelete" style="height:300px;width:400px;overflow:hidden;position:absolute;display:none;visibility:hidden;">
I also saw the following script:
<script type="text/javascript"> //<![CDATA[ Sys.WebForms.PageRequestManager._initialize('incTestWebDialog$ScriptManager1', document.getElementById('aspnetForm')); Sys.WebForms.PageRequestManager.getInstance()._updateControls([, [, [, 90); //]]> </script>
I then get an error "'null' is null or not an object" when I click on:
Based on what you said, I tried adding a watch for $find("incTestWebDialog_confirmDelete_clientState") and $find("incTestWebDialog$ScriptManager1") and they were both null also.