What I *REALLY* don't understand is the need to use appendChild, at all.
Why not just do this directly????
That is, figure out what the URIEncoded version of myurl
is ONE TIME and plunk it in place in the yahoo query url. Then you don't have to use an extra layer of indirection and appendChild and all the rest of it.