Hi,
I want to implement some wizard-like functionality. When the user clicks a "next" button inside a RadWindow the content of the window shall be replaced by another page. I have tried this with redirect but it didn't work as expected.
What is a suggested way to implement this behaviour.
Best regards,
Robert
5 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 08 Jan 2009, 09:13 AM
Hi Robert,
You can try this either from the server side using Response.Redirect(URL) or from client side by changing the URL of the window.
Option 1 - Server side:
CS:
Option 2 - Client side:
JavaScript:
ASPX:
Thanks,
Princy.
You can try this either from the server side using Response.Redirect(URL) or from client side by changing the URL of the window.
Option 1 - Server side:
CS:
protected void Button3_Click(object sender, EventArgs e) |
{ |
Response.Redirect("http://www.google.com"); |
} |
Option 2 - Client side:
JavaScript:
<script type="text/javascript"> |
function GetRadWindow() |
{ |
var oWindow = null; |
if (window.radWindow) oWindow = window.radWindow; |
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; |
return oWindow; |
} |
function ChangePage() |
{ |
GetRadWindow().SetUrl('Page1.aspx'); |
} |
</script> |
ASPX:
<input id="Button2" type="button" value="Change URL" onclick="return ChangePage()"/> |
Thanks,
Princy.
0
Matt
Top achievements
Rank 1
answered on 30 Aug 2009, 03:07 AM
We're using this approach and all is working fine, except how can we make it show an AJAX loading graphic while the new page loads (in the existing window)? We have some DB queries in the 2nd page's Load event that take some time and right now it just sits there on the 1st page and the user can't really tell that anything is happening. Is there something like "ShowContentOnLoad" that works for Response.Redirect??
0
Hello nowickim,
You could try using RadAjaxLoadingPanel for that purpose.
All the best,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
You could try using RadAjaxLoadingPanel for that purpose.
All the best,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Matt
Top achievements
Rank 1
answered on 31 Aug 2009, 03:27 PM
I'm not sure I follow. Can you elaborate?
0
Hi nowickim,
What I suggest is:
Best wishes,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
What I suggest is:
- Put a RadAjaxLoadingPanel on the parent page.
- When the button in your first page is clicked (the one that will redirect to the second page), show the RadAjaxLoadingPanel. You could use its API to position it over the RadWindow so it will look like it is in the content page, but will actually stay on the parent. This will allow you to show loading animation while the page in the RadWindow's IFRAME is redirected.
You could do this by using RadWindow's client-side API and execute the JavaScript function on the parent page that will show the panel. - Once the second page is loaded (you could do this in pageLoad() on the client) , call another JavaScript function on the parent page that will hide the RadAjaxLoadingPanel.
Best wishes,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.