I have a contact lookup so when i click on the lookup it opens a popup and i search for a particular contact. what i want is to restrict the result to display only contacts related to a account, for example in my case object i have account field i also have contact field when i click on the lookup of contact it should only show the contacts of the account. Do any body have any idea to do this. Please help me.
You can accomplish this using the Filtered Lookup feature.
If you are using visualforce page for this one workaround is to roll your own salesforce lookup popup window .
The above blog has tips and tricks on how to achieve this