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