/    Sign up×
Community /Pin to ProfileBookmark

get form XML result from external server

Hello
I’ve got a form that sends a file to an external website, and this website returns XML data. Is it possible at all to access this XML result? Or do I have to make a server-side script(which would make the user upload the file to my server which then uploads it to the external website)?

I’m using an iframe as target for the form, so I’ve tried grabbing the XML result from the iframe but realised that this is not possible. Right?

Another approach that I’ve tried is uploading the file using XMLHttpRequest(), but I found out that it’s not possible to upload files?

Is there any other way to do it? ?
I want to avoid doing it server-side as this would involve another upload.

/Niklas

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@niklasbauthorAug 11.2007 — I guess it's not possible to do this? I'll put it this way instead - can someone confirm that it does not work? ?

That way I can drop the idea of dealing with the XML on the client and start working with doing it on the server instead. It's a bummer, but I've been looking all over Internet and it does not seem possible ?
Copy linkTweet thisAlerts:
@Angry_Black_ManAug 12.2007 — my understanding is that when you do a ".open" on your xmlhttp object, it cannot be done cross-domain for security reasons.

upon further reading it seems there are hacks and workarounds to get this to work. i only briefly parsed them, so it looks like the work lies squarely on your shoulders.

http://community.salesforce.com/sforce/board/message?board.id=sforceExplorer&message.id=234

http://www.simple-talk.com/dotnet/asp.net/calling-cross-domain-web-services-in-ajax/

if you want to see where i got my sources from, visit this google:

http://www.google.com/search?hl=en&q=ajax+%22open+method%22+%22cross+domain%22&btnG=Google+Search
Copy linkTweet thisAlerts:
@pasha76Dec 26.2008 — niklasb,

I have exactly the same problem. Can you let me know how you solved your problem? Did you solve on your server side or could you manage to read the xml?

Thank
×

Success!

Help @niklasb spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...