hi

i'd like to display a form on my page from a page on a remote website. I have permission to use the content on that remote site. I dont want to display the entire remote page, just the form. I have no control over the element names or ID's on the remote site, so I need to refer to the remote element by tag and number, or by XPATH.

I also want to display the response from the form on my page, after the user clicks "submit". The response, also, should only display the element of the remote page i specify. If the remote form has several response steps, my page should display each response in turn.

i want my page to be ignorant about the contents of the remote form-- except for tag and element number. The script should work with any remote form.

I prefer client-side script and html, to reduce load on my server, because I want to load the form response into the same page on the client-side, AJAX-style, rather than refresh my entire page, or go to another page.

An iFrame would suffice, if iFrames could auto-resize to fit the content, and if there was a way to load only part of the remote page, but I have not found a way to do either. So i think it has to be javascript. I've read that XMLHttpRequest cannot query external domains; if so, is there another way?

Any suggestions?
Many thanks

thanks, but those do not do it. the first solution requires both sites to reside in the same domain-- its only for cross-SUBdomain scripting. the second solution requires a 3rd-party code library, which, as i mentioned, i'd like to avoid, and it uses an iFrame, which, as i mentioned, has other drawbacks.

...tho i may be misunderstanding what dojo is... seems like a server-side component, right?

This article has been dead for over six months. Start a new discussion instead.