Results 1 to 4 of 4

Thread: Send data directly to an IFrame?

  1. #1

    Thread Starter
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091

    Send data directly to an IFrame?

    I am getting an xml string and I would like it do show it as part of a page in the default formatting that IE does, but I don't want to have to save it to a file. Is this possible?

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Send data directly to an IFrame?

    I believe that the way XML is rendered is because of the extension/return type of the .XML file. For example, take an xml file, change its extension and open in IE.

    Therefore... you'd have to either save your xml string to an XML file, or create some sort of a web service/page that returns a stream of xml type so that the IFRAME knows how to render it (although I haven't tried this myself)

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Send data directly to an IFrame?

    Try getting the iframe's document and do a open('text/xml') on it, then write() the XML string there.

    No idea if it works, this is just theory. I know document.write does not work in Geckos.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  4. #4

    Thread Starter
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091

    Re: Send data directly to an IFrame?

    Quote Originally Posted by CornedBee
    Try getting the iframe's document and do a open('text/xml') on it, then write() the XML string there.

    No idea if it works, this is just theory. I know document.write does not work in Geckos.
    Thanks CB. The xml string is written to the document, but the content type doesn't appear to change to text/xml. Either that, or its just not rendered the same when you do a document.write.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width