Your comments

$.getJSON is working, silly me; however, general XMLHttpRequest still does not work due to the same origin restriction. For example, to make edits to a remote couchdb.  The window.create & bSave function did not work in MobileSafari or Nocs.


var host = "https://aa.iriscouch.com";
var dbname= "super"
window.create = function(dbname) {
return $.ajax({
type: "PUT",
url: "" + window.host + "/" + dbname,
success: function(json) {
return alert(JSON.stringify(json), {
error: (function(XMLHttpRequest, textStatus, errorThrown) {
return alert("XMLHttpRequest: " + XMLHttpRequest + "\nTextStatus : " + textStatus + "\nError Thrown: " + errorThrown);
})
});
}
});

var bSave = function (dbname, jsonTable) {
xhr = new XMLHttpRequest();
xhr.open("POST", host + dbname + '/_bulk_docs');
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.send(JSON.stringify({'docs':jsonTable}));
};

Thanks Alex; I simply assumed, as it doesn't work on Windows without serious modifications & it is not an advertised feature of textastic to have disabled the same-origin policy (perhaps I missed it). I use markdown combined with jQuery to produce statistical reports. 


Here is a simplest example of the kind of code I want to be able to use:

<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"> </script>
</head>
<body>
<div id="test"></div>
<div id="test2"></div>
<script type="text/javascript">
$.getJSON("

http://www.google.com/calendar/feeds/developer-calendar@google.com/public/full?alt=json

", function(x) { $("#test").html("<pre>" + JSON.stringify(x) + "</pre>"); });

$.getJSON("http://pipes.yahoo.com/pipes/pipe.run?_id=LFtDHHMs3BG_Un2LJhOy0Q&_render=json", function(x) { $("#test2").html("<pre>" + JSON.stringify(x) + "</pre>"); });

</script>
</body>
</html>


Also, the ability to export the Preview in PDF would be helpful, as this is taken for granted on a PC, not sure if this is possible in Textastic.


P.S. I just tested this code on the free Nocs markdown editor and it seems to WORK!! shocking ...  they offer exporting the HTML but does not offer exporting PDF, which is a shame as the HTML does not render properly on PC and the eventual purpose is to be able to print out the view to share with others in a meeting.

An alternative to having an HTTP proxy working inside Textastic, is to have a custom markdown directive to download the data needed to the local file system, where the markdown preview webkit engine can access.

I use markdown combined with HTML/js to render data & content loaded dynamically from other sites. Currently I use the pagedown web app for markdown, and this can be done easily by proxying AJAX requests to a remote couchdb server using node.js; however, on textastic, that is not possible due to cross-domain restrictions, what would be amazing is to have HTTP proxy is working inside Textastic to allow for cross-domain XMLHttpRequest Calls, then I would certainly buy the app.