ad_return_url (public)

 ad_return_url [ -urlencode ] [ -qualified ] [ extra_args ]

Defined in packages/acs-tcl/tcl/defs-procs.tcl

Build a return url suitable for passing to a page you expect to return back to the current page.

Example for direct inclusion in a link:

    ad_returnredirect "foo?return_url=[ad_return_url -url_encode]"
Example setting a variable to be used by export_vars:
    set return_url [ad_return_url]
    set edit_link [export_vars -base edit item_id return_url]
Example setting a variable with extra_vars:
    set return_url [ad_return_url [list some_id $some_id] [some_other_id $some_other_id]]

-urlencode (boolean) (optional)
If true url-encode the result
-qualified (boolean) (optional)
If provided the return URL will be fully qualified including http or https.
extra_args (optional) - A list of {name value} lists to append to the query string
Don Baccus <>

Partial Call Graph (max 5 caller/called nodes):
%3 ad_get_login_url ad_get_login_url (public) ad_return_url ad_return_url ad_get_login_url->ad_return_url ad_get_logout_url ad_get_logout_url (public) ad_get_logout_url->ad_return_url ad_restrict_to_https ad_restrict_to_https (public) ad_restrict_to_https->ad_return_url adp_parse_ad_conn_file adp_parse_ad_conn_file (public) adp_parse_ad_conn_file->ad_return_url bug_tracker::bug::get_list bug_tracker::bug::get_list (public) bug_tracker::bug::get_list->ad_return_url export_entire_form_as_url_vars export_entire_form_as_url_vars (public) ad_return_url->export_entire_form_as_url_vars

No testcase defined.
Source code:

    set query_list [export_entire_form_as_url_vars]

    foreach {extra_arg} $extra_args {
        lappend query_list [join $extra_arg "="]

    if { [llength $query_list] == 0 } {
        set url [ns_conn url]
    } else {
        set url "[ns_conn url]?[join $query_list &]"

    if { $qualified_p } {
        # Make the return_url fully qualified
        set url [security::get_qualified_url $url]

    if { $urlencode_p } {
        set url [ns_urlencode $url]
    return $url
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:

[ hide source ] | [ make this the default ]
Show another procedure: