Kbase 19154: How To Run Another HTML Page Or Web Site From WebSpeed
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  6/30/2009 |
|
Status: Verified
GOAL:
How to run another static HTML page or another Web site from WebSpeed.
GOAL:
How to redirect WebSpeed pages?
GOAL:
How to redirect HTML pages?
GOAL:
How to refresh WebSpeed pages?
GOAL:
How to refresh HTML pages?
FACT(s) (Environment):
All Supported Operating Systems
OpenEdge 10.x
WebSpeed 3.x
FIX:
SOLUTION for CGI-WRAPPERS & HTML-MAPPED:
To run another WebSpeed program from a WebSpeed program, use:
Run prog2.w but if you want to access a Web site, the only way to do it is use of
redirection of output. Take the following steps:
1) Create a new CGI-Wrapper file.
2) Replace the following line in the OutputHeader procedure:
output-content-type ("text/html":U).
with following code:
OUTPUT-HTTP-HEADER("Status","302").
OUTPUT-HTTP-HEADER("Location","<your URL>").
OUTPUT-HTTP-HEADER("","").
3) Compile and run the program.
Solution for HTML with SpeedScript:
If you would like to preform a HTTP-REDIRECT from an HTML file with embedded SpeedScript you must add an PROCEDURE OUTPUT-HEADER within the <HEAD> section of your HTML file like thus;
<HEAD>
<SCRIPT LANGUAGE="SpeedScript">
PROCEDURE output-headers:
OUTPUT-HTTP-HEADER("Status","302").
OUTPUT-HTTP-HEADER("Location","http://www.progress.com").
OUTPUT-HTTP-HEADER("","").
END PROCEDURE.
</SCRIPT>
</HEAD>