Hi
I have a page on which is a complex multi tabbed form that I want to appear when the user clicks a link on the main page.
Simple stuff. This I had working with the form appearing in a div that was hidden and simply made visible. However, having bought the Rad controls for ASP.NET I wanted the use the very attractive RadWindow to hold the form. It is there the problems began.
The entire form is in an update panel as it needs to be for many reasons not relevant to this issue.
The top of the form looks like this.
and so no.
You can see in there the first (and only) RadWindow in this RadWindowManager is called rwAdvancedSearchForm.
Back on the page I have a link that calls this javascript function.
... where ASP.NET is putting the name of the control into the page.
The problem is that the javascript breaks on the line 'win.show() as 'win' is not found.
Looking at the source code I can see that asp.net has put the correct name into the page. Here is a bunch of code from the source that has the js function above and the div at the bottom that is rsAdvancedSearchForm. You can see the names are correct.
Despite this the javascript cannot 'show()' the div has it cannot be found.
What's going on?
I have a page on which is a complex multi tabbed form that I want to appear when the user clicks a link on the main page.
Simple stuff. This I had working with the form appearing in a div that was hidden and simply made visible. However, having bought the Rad controls for ASP.NET I wanted the use the very attractive RadWindow to hold the form. It is there the problems began.
The entire form is in an update panel as it needs to be for many reasons not relevant to this issue.
The top of the form looks like this.
<
asp:UpdatePanel
runat
=
"server"
id
=
"UpdatePanel1"
UpdateMode
=
"Conditional"
>
<
ContentTemplate
>
<
telerik:RadWindowManager
ID
=
"rwManager"
Behaviors
=
"Close,Move, Resize"
ShowContentDuringLoad
=
"false"
VisibleStatusbar
=
"false"
ReloadOnShow
=
"true"
runat
=
"server"
Skin
=
"Outlook"
EnableShadow
=
"true"
>
<
Windows
>
<
telerik:RadWindow
ID
=
"rwAdvancedSearchForm"
Modal
=
"true"
runat
=
"server"
Width
=
"700"
Height
=
"600"
>
<
ContentTemplate
>
<
table
class
=
"dv"
cellpadding
=
"0"
cellspacing
=
"0"
border
=
"0"
>
and so no.
You can see in there the first (and only) RadWindow in this RadWindowManager is called rwAdvancedSearchForm.
Back on the page I have a link that calls this javascript function.
function showAdvancedSearchForm(){
var win = $find("<%#rwAdvancedSearchForm.ClientID %>");
win.show();
win.center();
}
The problem is that the javascript breaks on the line 'win.show() as 'win' is not found.
Looking at the source code I can see that asp.net has put the correct name into the page. Here is a bunch of code from the source that has the js function above and the div at the bottom that is rsAdvancedSearchForm. You can see the names are correct.
function showAdvancedSearchForm(){
var win = $find("ctl00_PageContent_rwAdvancedSearchForm");
win.show();
win.center();
}
</
script
>
<
div
id
=
"ctl00_PageContent_UpdatePanel1"
>
<
div
id
=
"ctl00_PageContent_rwManager"
style
=
"display:none;"
>
<
div
id
=
"ctl00_PageContent_rwAdvancedSearchForm"
style
=
"display:none;"
>
Despite this the javascript cannot 'show()' the div has it cannot be found.
What's going on?