If I followed you right in your specification, read the code right and assumed rightly that the function you have constructed that fires up on onclick event creates
the things you want up to and including xml and you want only xml to be generated by onclick, then I think
you should try to separate xml generating process into new function...
I hope this helped, but I apologize if I misunderstood you...
[ May 07, 2004: Message edited by: Gjorgi Var ]