Julieanne,
As I understand it, you want the widget to convert a local url to an absolute url.
Look at the source of ec_insecurelink[1] for ideas. It checks if a url is relative (at least for cases of [match /* $new_page] and then builds an absolute url from there.
see also source of these for more ideas:
util_absolute_path_p
subsite::get_url
ad_make_relative_path
1. https://openacs.org/api-doc/proc-view?proc=ec_insecurelink&source_p=1
hope that helps,
Torben