The following attitudes should be developed as conditions upon which God will hear and answer our prayers. The more we pray with these attitudes, the more effective our prayers will be.
Let us pray in acceptance that God knows better than we do what our needs are (Matthew 6:8, Romans 8:26, 2Corinthians 12:7-10).
The blessing of prayer has been clearly revealed to us in the scriptures. Let us trust what they say, and pray without doubting (James 1:5-7).
In Matthew 7:7-8 the Greek carries the idea of "keep on asking, keep on seeking, keep on knocking". Jesus said we should always pray and not give up (Luke 18:1-8, 1Thessalonians 5:17, Acts 16:23-25).
"You ask and do not receive because you ask amiss, that you may spend it on your pleasures" (James 4:1-3). They were not wrong to ask, but their asking was wrongly motivated. Example of wrong motives, James and John (Mark 10:35-37). Example of right motives, young Solomon (1Kings 3:3-15).
If we pray anything according to God's will he hears us and grants that prayer (1John 5:14).
Only "the prayer of a righteous man is powerful" (James 5:16). We receive from God what we ask only when we show ourselves willing and eager to keep God's commandments and do the things that please God (1John 3:22).
We are to make all our requests to God with thanksgiving (Philippians 4:6). God loves the grateful soul. He is not much interested in whingers (Daniel 2:23, Hebrews 13:15, Colossians 4:2, Ephesians 5:20).