PDA

Click to See Complete Forum and Search --> : (Newbie Q) sendAndLoad() and URLs: how much can you do?



mekae
06-27-2001, 03:37 PM
I would like to use the sendAndLoad() method to send and receive some XML, using some variables in the URL. Does anyone know if I can do the following?:

beginXml = new XML();
beginXml.load( "http://server/servlet/begin.xml" );
id = "myID";
sp = "mySp";
msg = beginXml.toString();
retXml = new XML();
retXml.sendAndLoad( "http://server/servlet/servlet?id="+id+"&sp="+sp+"&msg="+msg, retXml );

You help would be greatly appreciated!

Thanks,
Meka Egwuekwe

tupps
06-27-2001, 09:05 PM
The only possible problem that you could have is if the begin.xml document is very large then it may be too long to send back to the server.

Also this line;

retXml.sendAndLoad( "http://server/servlet/servlet?id="+id+"&sp="+sp+"&msg="+msg, retXml );

Is equivalent to:

retXml.Load( "http://server/servlet/servlet?id="+id+"&sp="+sp+"&msg="+msg);

All sendAndLoad does is loads the XML and passes it to another XML object, passing it back to the original does exactly the sames as .load.