Page 1 of 1
http header
Posted: Thu Aug 21, 1997 3:54 pm
by Thunderstone
Is there a way to change the HTTP header from
within webscript?
Modeling PubMed (
http://www.ncbi.nlm.nih.gov/PubMed/)
I want to allow the user to push a submit button to
save select hits as a text file.
http header
Posted: Thu Aug 21, 1997 4:15 pm
by Thunderstone
Yes; I assume in this case you want to set the Content-Type to
text/plain. Then use a .txt extension in the URL to invoke Vortex; this
will set the Content-Type to text/plain. Ie. instead of the action URL:
/cgi-bin/texis/webinator/search/
use:
/cgi-bin/texis/webinator/search/yourfunc.txt
where "yourfunc" is the name of your text-generating function.
If you want to "manually" set any header, use the extension .bin. See
http://www.thunderstone.com/vortexman/node16.html for details.
-Kai
Kai Getrost | Thunderstone Software - EPI, Inc.
kai@thunderstone.com |
info@thunderstone.com
http header
Posted: Fri Aug 22, 1997 8:10 am
by Thunderstone
I have been at this for hours and I can't do it.
I want to right justify document numbers in HTML
output by left padding with  .
When I try this
<strfmt "%4i" $x>
<sandr "\space" " " $ret>
<fmt "%s" $ret>:
only the first space is replaced with  
If I use "n" as the expression, then
all the spaces are replaced. I have tried a million
variants. Can anyone help?
--------------------------------------------------------------
Larry Rudner
rudner@cua.edu
ERIC Clearinghouse on 800 464-3742 (800 Go4-ERIC)
Assessment and Evaluation 202 319-5120
Catholic University of America FAX: 202 319-6692
Washington, DC 20064
http://ericae2.educ.cua.edu
http header
Posted: Fri Aug 22, 1997 10:59 am
by Thunderstone
Vortex is doing it correctly, but Netscape is lying to you
when you view source because it is confused by the lack of ; on
the end of   ( ). If you were to "save as html" and view
the file you would see the correct output.
Using the correct HTML coding for non breaking space will make it work.
Here's your code with a couple other minor changes:
<strfmt "%4i" $x>
<sandr " " " " $ret>
<send $ret>:
As you may know, space padding only works correctly with a fixed width
font. You might want to use a <table> instead. Then you can specify
alignment styles.