Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
114
rated 0 times [  115] [ 1]  / answers: 1 / hits: 7384  / 10 Years ago, mon, march 3, 2014, 12:00:00

How to set navigateurl for radwindow in javascript ?



I want to use a radwindow in my page, and I use it in tow part.



I have a radwindow that I use it in 2 part.



 <telerik:RadWindowManager ID=RadWindowManager1 ShowContentDuringLoad=false
VisibleStatusbar=false
RegisterWithScriptManager=True
EnableShadow=True ReloadOnShow=true Width=800px Height=550px
runat=server>
<Windows>
<telerik:RadWindow ID=modalPopup runat=server Modal=True
>
</telerik:RadWindow>
</Windows></telerik:RadWindowManager>


I use javascript for show radwindow.



<telerik:RadCodeBlock runat=server ID=rdbScripts>
<script type=text/javascript>

function showDialogInitially() {
var wnd = $find(<%=modalPopup.ClientID %>);
wnd.show();
Sys.Application.remove_load(showDialogInitially);
}





When I click on a button , set Navigateurl of radwindow = (DefCall.aspx) and when I click to other button , set navigateurl = (DefTask.aspx) and passe 2 value to the child page by QueryString or other way.



protected void btnDefCall_Click(object sender, EventArgs e)
{
string strURL = string.Format(../PhoneCall/DefPhoneCall.aspx
?FormTypeID={0}&FormID={1}, number1,number2);
modalPopup.NavigateUrl = strURL;

ScriptManager.RegisterStartupScript(Page, GetType(), PopupScript, string.Format(javascript:showDialogInitially()), true);

}


protected void btnDefTask_Click(object sender, EventArgs e)
{
string strURL = string.Format(../Task/DefTask.aspx?FormTypeID={0}&FormID={1}, (int)clsHelper.FormType.Lead, int.Parse(Request.QueryString[ID].ToString()));
modalPopup.NavigateUrl = strURL;

ScriptManager.RegisterStartupScript(Page, GetType(), PopupScript, string.Format(javascript:showDialogInitially()), true);
}

More From » asp.net

 Answers
3

Check out the RadWindow API you can change the url through javascript like this



var wnd = $find(<%=modalPopup.ClientID %>);
wnd.setUrl(http://www.google.com);

[#47217] Sunday, March 2, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rickjordond

Total Points: 100
Total Questions: 105
Total Answers: 90

Location: Sweden
Member since Mon, May 8, 2023
1 Year ago
;