Click to See Complete Forum and Search --> : xml + frame


carbunaruf
08-21-2003, 09:08 AM
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

Khalid Ali
08-25-2003, 01:36 AM
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+)

carbunaruf
08-25-2003, 09:12 AM
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

Khalid Ali
08-25-2003, 12:40 PM
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.

carbunaruf
08-26-2003, 01:09 AM
Thank you very much.
This is not i what i want to hear. It's very sad.
Thank you again.