By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,332 Members | 1,198 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,332 IT Pros & Developers. It's quick & easy.

Related Multi-Selects, iframes, ajax, other?

P: n/a
I have several related multi-selects on a page (country, state/
province, city, address). There are 4 - 7 other unrelated fields on
the page also. Even though this is an intranet app where a
traditional submit is normally very fast, there are other user/design
considerations which make submitting the entire page not as desirable.

I am just looking for some verification that an iframe returning an
array would be fine. I have not worked with Ajax, but would consider
it if there were significant advantages (I think you can stop a
request). I am also worried about using onchange with multi-selects,
additional requests could be firing before results are returned.

Feb 19 '07 #1
Share this Question
Share on Google+
2 Replies

P: n/a
On Feb 18, 8:29 pm, "johkar" <nosendj...@msn.comwrote:
I have several related multi-selects on a page (country, state/
province, city, address). There are 4 - 7 other unrelated fields on
the page also. Even though this is an intranet app where a
traditional submit is normally very fast, there are other user/design
considerations which make submitting the entire page not as desirable.

I am just looking for some verification that an iframe returning an
array would be fine. I have not worked with Ajax, but would consider
it if there were significant advantages (I think you can stop a
request). I am also worried about using onchange with multi-selects,
additional requests could be firing before results are returned.
Although both techniques (iframe and XHLHttpRequest, aka XHR, aka
Ajax) are used for asynchronous requests (and therefore could both be
called Ajax), pretty much the only circumstance under which iframes
are advantageous to XHR is for file uploads, which is impossible with
current XHR implementations and security restrictions. The amount of
code generally required to set up and use XHR is smaller, and you have
more fine-grained control of the request process. Also, iframe Ajax
is considered a "hack" and involves DOM scripting, while XHR was
created specifically for this purpose. Learn both techniques, write
code to try them out, then come back if you're having problems.

-David

Feb 19 '07 #2

P: n/a
David Golightly wrote:
<snip>
... pretty much the only circumstance under which iframes
are advantageous to XHR is for file uploads, which is impossible
with current XHR implementations and security restrictions.
<snip>

That is not really true. It should be entirely possible to assemble the
body of a multipart post request contain appropriately encode data that
would be taken as an uploaded file when received at the server. So you
could create a 'file' in memory and upload it to a server. The impossible
part is getting a file from the user's hard disk and putting its contents
into a javascript string, under the normal security constraints.

Richard.

Feb 19 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.