hi i’m trying to upload a image from an iframe and is working, but cant get the response from the server, i try to set the target of the form to _blank and i get an promp to save the file instead of displaying it as html or plain txt when trying to open the saved file blackberry alerts “can display file” but if i send the file over Bluetooth and open it in mi pc it have the valid server response,i think that is the mime types that are preventing the iframe to load but i don’t know if i’m correct
this are the header that the server return:
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:Keep-Alive
Content-Type:application/json
Date:Fri, 24 Feb 2012 00:31:06 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:timeout=15, max=61
Pragma:no-cache
Server:Apache/1.3.42 (Unix) mod_jk/1.2.30 mod_gzip/1.3.26.1a mod_log_bytes/1.2 mod_bwlimited/1.4 mod_ssl/2.8.31 OpenSSL/0.9.8e-fips-rhel5
Transfer-Encoding:chunked
X-Powered-By:PHP/5.2.17
i get the header from a desktop chrome
i’m doing after hours to get this fixed but i can´t figure out how to work around this any help will be appreciated thanks
update
i try the mime type stuff and i can reproduce the problem seting the json mime type to an arbitrary document whit this code
<?php header('Content-type: application/json'); ?>
and as spected i get de “culd no load” alert on blackberry, is there any way i can force it to show the json as plain text so i can later parse it?
Probably too late to help you out but maybe this will help someone else…
Essentially when you send text back to an empty iframe, the browsers are looking at the incomming data and if its not HTML they’re wrapping tags around it.
If you change your header to content-type: text/html the browsers will not populate the iframe with html and you get the raw json.