Forum OpenACS Q&A: Different content types for adp

Request notifications

Collapse
Posted by Franz Wirl on
Can change the return type pf an ADP-file to another type than text/html. I would need to have an adp that returns as text/javascript.
Collapse
Posted by Torben Brosten on
Franz Wirl,

Try embedding an ns_return in a tcl portion of an adp page..

cheers,

Torben

Collapse
Posted by Franz Wirl on
Thanky for the idea, but how can I get the adp content to be used for ns_retun

ns_return 200 "application/x-javascript" noIdeaAboutVarName

Collapse
Posted by Franz Wirl on
Finaly I found a solution

ns_set put [ad_conn outputheaders] "content-type" "application/x-javascript; charset=utf-8"