Vive is correct, you can submit a contract "contingent" on the sale of your home and arrange a simultaneous closing.
You should also talk to your loan officer about your mortgage options. Depending on your financial situation, you may be able to buy the house you want with a first and second mortgage, then pay off the second as soon as your house sells.
Hopefully you're being represented by a real estate agent. If your agent can't answer questions like this, you should find a new agent who can walk you through your options.... more
Here is a link to the California program. It is a DAP program used in connection with an FHA loan. It is not a grant that is forgiven you do have to pay it bank at some point. Find out the details at the link below: