thank you for your answer. i wanted to ask 2 more questions:1)how do i make the window close if the user clicks outside of it2)i have a lot of input(also dinamicly) boxes that i use this script for and every time it opens at the top of the page. i know how to change the location to a diifrint one but how can i set it up to be close to my input box(give it a reletive location)?Thank you