|  | Whitebeam Template Reference Documentation
 | 
| 
|  System Template redirect()
 
				The server returns the output of another page to the user.
			  Syntax void = rb.page.redirect(targetFilename)  Parameters The 'redirect' method takes 1 parameter: 
 | Name | Type/Value | Range/Length | Description |  | targetFilename | string |  | Required. 
				The name of the file to load instead of the current file. |  
  Results The 'redirect' method returns no useful information.  Remarks  Server-side redirection. This method requests that the Presentation Engine complete execution
				of this Pattern Page and then immediately execute a different Pattern Page. The output from the current 
				page is discarded and replaced with the output generated by the new page.
				 This has the effect of a 'server-side' redirect. The Presentation Engine loads the page
				requested by the client browser and then executes that page. Once processing of that page is complete
				the engine checks for redirect requests. If a redirect has been requested the engine completely discards 
				the output generated so far and starts afresh with the new page. Bear in mind the following points: The first page continues to completion. Subsequent server side intelligence may
					directly interract with templates.The presentation page an intelligently  redirect to another page. For example based on the
					authorisation level of the user.The redirected page inherits the exact same operational parameters presented by the browser to 
					the first page. So the second page for example will have the same set of form parameters if there were any.If the target for the redirect does not exist then the client will be presented with the standard 'NotFound.rhtm'
					or 'WhitebeamNotFound.rhtm'.
 In the test instance - if the first page generates errors the redirection page is not loaded and instead
					the standard error page is used to report the errors on the first page. Example  
						var formdata = rb.page.formdata();
 if (formdata.myParameter) {
 // parameter is present so process data.
 ProcessData(formData);
 
 // Now cause the next page to be displayed.
 rb.page.redirect("page2.rhtm");
 }
 else {
 // No form data. Display this form.
 WriteHTMLForm();
 }
 |  | 
| (loadtime : 58ms) |