PDA

View Full Version : may from one html file open more than one xml file > all results on screen same time?


lse123
03-25-2008, 05:40 PM
AJAX
may from one html file open more than one xml file eg 3 (with php combined), from 3 websites and appear all results on screen same time ?
I must use 3 httpRequest object instances ?
Please if is easy answer yes/no:
I must make 3 js functions[fillNewsInfo()] that call SEPARATELLY httpRequest1.responseXML, the other httpRequest2.responseXML, and the other httpRequest3.responseXML, ...? yes/no

all these functions must be called with
httpRequest1.onreadystatechange=fillNewsInfo1;
httpRequest2.onreadystatechange=fillNewsInfo2;
httpRequest3.onreadystatechange=fillNewsInfo3;
in the updateNewsInfo() function ? yes/no

I can do this [include multiple functions] asychronyously only ? yes/no

May do a function BUILDS get httpRequest objects with a parameter like:
function getRequestObject(httpRequest) {
httpRequest = new XMLHttpRequest();
}
? yes/no

A textbox <input type"text" name="first" /> when submitted without touch it or get focus to it[hence is empty] will have $_POST['first']=null or "" or undefined ?

clearInterval(timer); in js will cause error if timer action stopped from before ? timer no exist...

A1ien51
03-26-2008, 04:40 PM
Did you try? if so what happened.

You can make multiple requests. If you are having trouble, make sure it is not a global variable that is getting in the way. All three calls will not come back at the same exact time, that all depends on how fast the call is processed and other little factors.

IE6-7 is limited to two calls at a time [It will queue up the others until one is freed.] IE8 and Firefox have more connections than that.

Eric