create popup from javascript function