Get URL for uploaded images

If I use the field for images (File or database), is there a way to get the URL to the image to pass to a Javascript?

Nevermind, found a way. If anyone need to know, use the globals that are in the session. It is stored as $_SESSION[‘scriptcase’][‘BLANK APP NAME’][‘glo_nm_path_imagens’];

Just add your folder as well which you configured on the upload settings for the image (file based).