untitled_7

published
updated
source uri
author
contributor
Handler
acre handler
plural name
  • Scripts

summary

// my implementation of cross-domain POST ui.js_to_python = function (text_to_type) { text_to_type...

content

// my implementation of cross-domain POST ui.js_to_python = function (text_to_type) { text_to_type = unicode.escape_str(text_to_type); var iframe = document.createElement('iframe'); iframe.style.display='none'; document.body.appendChild(iframe); var iframe_doc = (iframe.contentWindow || iframe.contentDocument); // see http://xkr.us/articles/dom/iframe-document/ if (iframe_doc.document) { iframe_doc = iframe_doc.document; } var html = [ '', ' ', ' ', ''].join('\n'); iframe_doc.write(html); var form = iframe_doc.getElementById('the_form'); form.submit(); setTimeout( function() { $(iframe).remove(); },10); // Safari_hack: timeout wasn't required in FF };
Created by coco Aug 14, 2008
Last edited by coco Aug 14, 2008
View topic history »

Comments

There is no discussion about this document.

Start the Discussion »