And He said to them, "What do you want Me to do for you?"
They said to Him, "Grant us that we may sit, one on Your right hand and the other on Your left, in Your glory."
But Jesus said to them, "You do not know what you ask. Are you able to drink the cup that I drink, and be baptized with the baptism that I am baptized with?"
Mark 10:35-38 (NKJV)
Have you ever seen someone, most likely a child, asking for and insisting on having something? If they are denied having the object of their desire, they can become very unhappy and even unruly. The child may have no idea what the item costs or if it is a good thing for them to have, but they know they want it and they are convinced they should have it. The child's desire has blinded them to anything other than that they want this thing.
It is not really surprising that we all tend to be like the child, we want something and all we can think about is having that thing without realizing what it really means to have it. This is the situation Jesus faced with His disciples. They wanted to be with Jesus and to have a high position with Him. Without any real understanding of what they were asking for, like children, they said to Jesus, "we want you to do for us whatever we ask".
We often have the same problem that James and John had; we really do not even know if what we are asking for is right or not, we just want God to do what we want. When we talk to God, we should not just focus on what do I want, but what does God want? Prayer is not a magic wand that brings us what we want just because we want it; we must first know if what we are asking for is really God's will. God loves us, and wants us to have good things, but we must know if what we ask for is in the will of God, in His Word.