Posted by:
peter75
(---.dip0.t-ipconnect.de)
hello mr. RiggsFolly,
it is not a acceptable problem report?
first: is there a way to disable the stupid smiley faces? oherwise it is not possible to post readable plain code... or is it?
you can see my very minimalistic code above.
1. simple html file . name does not matter.
2. a php file with only 6 lines - postTestReceiver.php.
it does not work.
there will be no post variable as long i am trying to set "Content-Type", "application/json";
that's why i disabled this line by comment.
by using "Content-Type", "application/x-www-form-urlencoded" there will be a post variable in php but you can not handle it like plain json...
i mean, this is really easy to try out and should be a really common issue ...???
i tried some "AddType 'application/json; charset=UTF-8' .json" in httpd.conf - cause i think there is no json type... but this does not work.
P.S. yupp i know jQuery.
the code above is a really short one.
and you don't need a additional library to make a xhr...
to make this easier to try out, i uploaded the testfiles to my dropbox.
[
www.dropbox.com]
hope you will try it.
thy peter