Click area & based on coordinates execute

Hiii
I am very new to opengl programming…Help me out…
I have created a window size of 1000,850
In this window, I have placed a image on 75 % of the portion & the other 25% created some text box & asking for input from kepyboard…
Now my image is in area (x>935 && x<990 && y>306 && y<332)
What i want to do is in this area if i click on a specfic points using mouse function… Then it should wait for a mouse click which is in area (x>940 && x<968 && y>431 && y<448)(ie textbox asking for input)
Then its takes the values from this box & display only that image with mouse clicks… How is it…
Without the waitin for mouse click in other area its working…But when i want input & then it should display is not working…Please help me…