Joined April 2014
·

Roso Sasongko

Depok, Indonesia
·
·

To get a response, we may be able to determine the target form post to a hidden iframe. Then, we listen the iframe load event, then parsing the contents of the iframe using native javascript like this or whatever:

var response = {
responseText: ''
};

var doc = frame.contentWindow.document || frame.contentDocument,
contentNode;

if (doc && doc.body) {
if ((contentNode = doc.body.firstChild) && /pre/i.test(contentNode.tagName)) {
response.responseText = contentNode.textContent;
}
else if ((contentNode = doc.getElementsByTagName('textarea')[0])) {
response.responseText = contentNode.value;
}
else {
response.responseText = doc.body.textContent || doc.body.innerText;
}
}
</pre>

Achievements
1 Karma
0 Total ProTip Views
Interests & Skills