www.webdeveloper.com
Results 1 to 5 of 5

Thread: xml + frame

  1. #1
    Join Date
    Aug 2003
    Location
    bucharest
    Posts
    3

    Angry xml + frame

    Hello

    I have a little problem with some xml and frames. I have a form which i submit to a server and base on some of my fields this page generats me in a frame or iframe an xml file(frame which i specify in form target). This being said I have to take this xml out these xml. How can i do that?

    I have tried with some javacript but it's useless because i cannot access the xml. Is there any way or maybe some of you have some other ideea about how I can get these xml?

    Thanks Sebe

  2. #2
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,123
    there are multiple ways to import XML file in a document

    1. Use IE specific <xml id="xmlFile" src"fileName.xml">

    2. Use direct approach and open an xml file directly in browser and use XSL import in the xml file for layout.

    3. My fav is to embed xml file in the webpage for cross browser access and access the xml elements using DOM methods(IE and NS6+)
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  3. #3
    Join Date
    Aug 2003
    Location
    bucharest
    Posts
    3

    Unhappy

    My form look like this:

    <form id="form1" name="formBarcelo" action="http://servername/xml" method="post" target="ifr">
    <input id="xml" type="text" name="xml" runat="server">
    <iframe id="ifr" name="ifr" onload="a(this);" ></iframe>
    </form>

    function a(){
    alert(document.frames[0].name);
    //this return my frame name
    alert(document.frames[0].scr);
    //this return undefine. why?
    }
    I try this on IE6
    How did you say that i can take frame src address because i tryed but i didn't succed to get this src. I preffer to open this xml with DOM but i don't know how because i have to send some xml in that input "xml" and base on that field it is generated the xml file response.
    By carbunaruf

  4. #4
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,123
    There is one very important issue involved here.
    If the file you are opening in the frame is not served from your server(i.e out of domain resource) then you can not access that.
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  5. #5
    Join Date
    Aug 2003
    Location
    bucharest
    Posts
    3

    Unhappy

    Thank you very much.
    This is not i what i want to hear. It's very sad.
    Thank you again.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles