dojo/io/iframe.js

  • Provides:

    • dojo.io.iframe
  • dojo.io.iframe.__ioArgs

    • type
      Function
    • chains:
      • dojo.__IoArgs: (prototype)
      • dojo.__IoArgs: (call)
    • source: [view]
        this.method = method;
        this.handleAs = handleAs;
        this.content = content;
    • summary
      All the properties described in the dojo.__ioArgs type, apply
      to this type. The following additional properties are allowed
      for dojo.io.iframe.send():
  • dojo.io.iframe.__ioArgs.method

    • type
      String?
    • summary
      The HTTP method to use. "GET" or "POST" are the only supported
      values.  It will try to read the value from the form node's
      method, then try this argument. If neither one exists, then it
      defaults to POST.
  • dojo.io.iframe.__ioArgs.handleAs

    • type
      String?
    • summary
      Specifies what format the result data should be given to the
      load/handle callback. Valid values are: text, html, xml, json,
      javascript. IMPORTANT: For all values EXCEPT html and xml, The
      server response should be an HTML file with a textarea element.
      The response data should be inside the textarea element. Using an
      HTML document the only reliable, cross-browser way this
      transport can know when the response has loaded. For the html
      handleAs value, just return a normal HTML document.  NOTE: xml
      is now supported with this transport (as of 1.1+); a known issue
      is if the XML document in question is malformed, Internet Explorer
      will throw an uncatchable error.
  • dojo.io.iframe.__ioArgs.content

    • type
      Object?
    • summary
      If "form" is one of the other args properties, then the content
      object properties become hidden form form elements. For
      instance, a content object of {name1 : "value1"} is converted
      to a hidden form element with a name of "name1" and a value of
      "value1". If there is not a "form" property, then the content
      object is converted into a name=value&name=value string, by
      using dojo.objectToQuery().
  • dojo.io.iframe

    • type
      Object
    • summary
      Sends an Ajax I/O call using and Iframe (for instance, to upload files)
  • dojo.io.iframe.create

    • type
      Function
    • parameters:
      • fname: (typeof String)
        The name of the iframe. Used for the name attribute on the
        iframe.
      • onloadstr: (typeof String)
        A string of JavaScript that will be executed when the content
        in the iframe loads.
      • uri: (typeof String)
        The value of the src attribute on the iframe element. If a
        value is not given, then dojo/resources/blank.html will be
        used.
    • source: [view]
        if(window[fname]){ return window[fname]; }
        if(window.frames[fname]){ return window.frames[fname]; }
        var cframe = null;
        var turi = uri;
        if(!turi){
         if(dojo.config["useXDomain"] && !dojo.config["dojoBlankHtmlUrl"]){
          console.warn("dojo.io.iframe.create: When using cross-domain Dojo builds,"
           + " please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl"
           + " to the path on your domain to blank.html");
         }
         turi = (dojo.config["dojoBlankHtmlUrl"]||dojo.moduleUrl("dojo", "resources/blank.html"));
        }
        var cframe = dojo.place(
         '