NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: patrick de laet on June 18, 2011, 08:26:30 AM
-
(handcoded NetWebPage)
In the Header routine the following code is what I see . . .
p_web.ReplyContentType = 'text/html; charset=utf-8'
p_web.ParseHTML(packet,1,0,Net:SendHeader+Net:DontCache)
But: text/xml is set in the response headers. . .
I just want to return 'OK' to the JQuery Form Plugin.
Just 2 letters 'OK' - no xml.
But it gives me the following error . . .
XML Parsing Error: syntax error Location: moz-nullprincipal:{5c54f1ad-9227-4ca9-8e06-27b87dfcb9f1} Line Number 1, Column 1:
OK
^
I think because of the text/xml in the response headers. . .
Anybody an idea?
regards
Patrick De Laet
-
I've found it hardcoded in NetWeb.clw - parseHTML procedure
When I change it to . . .
If self.RequestAjax = 1
self.ReplyContentType = 'text/html; charset=utf-8'
end
. . . my JQuery Form Ajax request works now.
But permanently modifying NetWeb.clw is of course not an option.
Anybody another idea?
regards
Patrick De Laet
-
You're right, don't edit the netweb.clw rather embed in webhandler. I think probably in CreateHeader.
Let me know if you need more.
Cheers
Bruce