Click to See Complete Forum and Search --> : Server Side redirect


Beldale
05-27-2003, 04:51 PM
How do I do a redirect within Server Side code ? I would like the page to transfer to another page upon success. i.e. window.location = "mypage.html";

any assistance would be appreciated.

brendandonhue
05-27-2003, 04:55 PM
1. Which server side language are you using?
2. Why did you post in a forum thats clearly for client side coding?

Beldale
05-27-2003, 05:04 PM
This is the only JavaScript forum available - I am modifing an application that utilizes Server side JavaScript (<SCRIPT LANGUAGE="JavaScript" RUNAT="Server">)... I am an ASP programmer and have been tasked to utilize a cots application and modify it to our standards, which I have done except for a couple exceptions like "After a successful save redirect the user to the main page with message."

Anyway with that out of the way... any ideas?

Beldale
05-28-2003, 08:19 AM
Unfortunatly the way the cots application is created I cannot mix and mingle the code. Thank you for your assistance.

Beldale
05-28-2003, 09:33 AM
What I have attempted:

response.redirect
window.location
location
setting a global variable and attempting to check it within Client-Side Javascript.
setting an asp vaiable within the JavaScript function.

- none of these gave me anything except page errors.

language set at the top of the viewed page: <%@ Language=VBScript %>

language set within the include pages: <SCRIPT LANGUAGE="JavaScript" RUNAT="Server">

The cots application actually calls many include pages and each contains multiple functions. The paticular code I am attempting to change updates a database and displays a message on success - I am attempting to make the function redirect on success.

Beldale
05-28-2003, 10:08 AM
OK... I am a hardheaded asp developer. I've mixed allot of asp with JavaScript and have always used the asp tags (<% %>), well with Server Side JavaScript it appears that it is not needed. After discussing this with you I went back and tried "Response.Redirect("page.asp") without encapsulating it with the asp tags, and it worked just as expected.

Thank you, and please forgive my ignorance with Server-Side JavaScript.